Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Varijabla
- new CamperDInt[MAX_PLAYERS];
- //Pod OnPlayerDeath i OnPlayerConnect
- CamperDInt[playerid] = 0;
- //Pod onplayerdisconnect
- for(new i = 0; i < MAX_PLAYERS; i++) {
- if(CamperID[i] == owncamp[playerid] && IsValidVehicle(owncamp[playerid]) && CamperDInt[i] == 0) {
- SendClientMessage(i, COLOR_GRAY, "Vlasnik kampera je upravo izasao sa servera, pri izlasku cete biti prebaceni na poziciju s ulaska.");
- CamperDInt[i] = 1;
- }
- }
- //Komanda
- dcmd_kizlaz(playerid, params[])
- {
- #pragma unused params
- if(CamperID[playerid] > 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 768.0327,1402.8625,-4.5741))
- {
- if(VoziloKamper(CamperID[playerid]) && IsValidVehicle(CamperID[playerid]) && CamperDInt[playerid] == 0)
- {
- new Float:vpos[3];
- GepekVozila(CamperID[playerid], vpos[0], vpos[1], vpos[2]);
- AC_SetPlayerPos(playerid, vpos[0], vpos[1], vpos[2]);
- SetPlayerVirtualWorld(playerid, GetVehicleVirtualWorld(CamperID[playerid]));
- SetPlayerInterior(playerid, 0);
- CamperID[playerid] = 0;
- }
- else
- {
- AC_SetPlayerPos(playerid, CamperPos[playerid][0], CamperPos[playerid][1], CamperPos[playerid][2]);
- SetPlayerVirtualWorld(playerid, 0);
- CamperID[playerid] = 0;
- CamperDInt[playerid] = 0;
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement