Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- YCMD:exit(playerid, params[],help)
- {
- #pragma unused help
- #pragma unused params
- for(new g; g < MAX_GARAZA; g++)
- {
- new gid = UsaoGaraza[playerid];
- if(IsPlayerInRangeOfPoint(playerid, 7.0, GarazaInfo[gid][gIzlazX], GarazaInfo[gid][gIzlazY], GarazaInfo[gid][gIzlazZ]))
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- UsaoGaraza[playerid] = 0;
- SetPlayerPos(playerid, GarazaInfo[gid][gUlazX], GarazaInfo[gid][gUlazY], GarazaInfo[gid][gUlazZ]);
- }
- else if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- new vid = GetPlayerVehicleID(playerid);
- if(IsPlayerInVehicle(i, vid))
- {
- SetVehiclePos(vid,GarazaInfo[gid][gUlazX], GarazaInfo[gid][gUlazY], GarazaInfo[gid][gUlazZ]);
- SetVehicleVirtualWorld(vid,0);
- LinkVehicleToInterior(vid, 0);
- ////////////////////////////////////////////////////
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, GarazaInfo[gid][gUlazX], GarazaInfo[gid][gUlazY], GarazaInfo[gid][gUlazZ]);
- PutPlayerInVehicle(playerid,vid,0);
- UsaoGaraza[i] = 0;
- }
- }
- }
- }
- }
- return 1;
- }
- YCMD:enter(playerid, params[],help)
- {
- #pragma unused help
- #pragma unused params
- for(new g; g < MAX_GARAZA; g++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 7.0, GarazaInfo[g][gUlazX], GarazaInfo[g][gUlazY], GarazaInfo[g][gUlazZ]))
- {
- if(PI[playerid][pGaraza] == g || GarazaInfo[g][gZatvoreno] == 0)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- SetPlayerVirtualWorld(playerid, GarazaInfo[g][gVW]);
- SetPlayerInterior(playerid, GarazaInfo[g][gInt]);
- SetPlayerPos(playerid, GarazaInfo[g][gIzlazX], GarazaInfo[g][gIzlazY], GarazaInfo[g][gIzlazZ]);
- }
- else if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- new vid = GetPlayerVehicleID(playerid);
- if(IsPlayerInVehicle(i, vid))
- {
- SetVehiclePos(vid,GarazaInfo[g][gIzlazX], GarazaInfo[g][gIzlazY], GarazaInfo[g][gIzlazZ]);
- SetVehicleVirtualWorld(vid,GarazaInfo[g][gVW]);
- LinkVehicleToInterior(vid, GarazaInfo[g][gInt]);
- ////////////////////////////////////////////////////
- SetPlayerVirtualWorld(playerid, GarazaInfo[g][gVW]);
- SetPlayerInterior(playerid, GarazaInfo[g][gInt]);
- SetPlayerPos(playerid, GarazaInfo[g][gIzlazX], GarazaInfo[g][gIzlazY], GarazaInfo[g][gIzlazZ]);
- PutPlayerInVehicle(playerid,vid,0);
- }
- }
- }
- UsaoGaraza[playerid] = g;
- }
- else return GameTextForPlayer(playerid,"~w~Garaza ~r~zakljucana",5000,3);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment