Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //nova varijabla
- new bool:ModShopUsao[MAX_PLAYERS];
- //onplayerconnect
- ModShopUsao[playerid] = false;
- public OnEnterExitModShop(playerid, enterexit, interiorid)
- {
- ModShopUsao[playerid] = true;
- return 1;
- }
- //izmjeni
- forward AC_SetPlayerPos(playerid, Float:x, Float:y, Float:z);
- public AC_SetPlayerPos(playerid, Float:x, Float:y, Float:z)
- {
- Portan[playerid] = 3;
- GetPlayerPos(playerid, PortK[0][playerid], PortK[1][playerid], PortK[2][playerid]);
- SetPlayerPos(playerid, x, y, z);
- return 1;
- }
- // timer od 1 sec
- if(Igrac[i][pAdminNivo] == 0 && Igrac[i][pGameXpert] == 0 && !ModShopUsao[i] && UWSobi[i] == 999 && Portan[i] == 0 && GetPlayerSurfingVehicleID( i ) == INVALID_VEHICLE_ID)
- {
- if(!IsPlayerInRangeOfPoint( i, 200.0, PortK[0][i], PortK[1][i], PortK[2][i]) && GetPlayerState(i) != PLAYER_STATE_PASSENGER && GetPlayerState(i) != PLAYER_STATE_SPECTATING)
- {
- format(carcit, 128,"{F81414}YUB AC/A |{F3FF02} Registrovano moguce portanje igraca %s (%d).",GetPlayerNameEx(i), i);
- MessageToAdmins(COLOR_GREY,carcit,1,9999);
- PortAC[i]++;
- if(PortAC[i] == 2)
- {
- SendClientMessage(i, COLOR_GREY, "{F3FF02}[YUB]: {F81414}Izbaceni ste zbog cheatova za portanje!");
- SetTimerEx("KickPublic", 100, 0, "d", i);
- }
- PortLog(i);
- }
- else if(!IsPlayerInRangeOfPoint( i, 500.0, PortK[0][i], PortK[1][i], PortK[2][i]) && GetPlayerState(i) != PLAYER_STATE_PASSENGER && GetPlayerState(i) != PLAYER_STATE_SPECTATING)
- {
- format(carcit, 128,"{F81414}YUB AC/A |{F3FF02} Igrac %s (%d) je izbacen zbog cheatova za portanje.",GetPlayerNameEx(i), i);
- MessageToAdmins(COLOR_GREY,carcit,1,9999);
- SendClientMessage(i, COLOR_GREY, "{F3FF02}[YUB]: {F81414}Izbaceni ste zbog cheatova za portanje!");
- SetTimerEx("KickPublic", 100, 0, "d", i);
- PortLog(i);
- }
- }
- GetPlayerPos(i, PortK[0][i], PortK[1][i], PortK[2][i]);
- ModShopUsao[i] = false;
- if(Portan[i] > 0)
- {
- Portan[i]--;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement