Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //anti car warp or wrap i allways forget lol, and also anti trollboss since it req to warp or wrap to players car.
- #include <a_samp>
- new bool:warp[MAX_PLAYERS];
- public OnPlayerConnect(playerid)
- {
- warp[playerid] = false;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- warp[playerid] = false;
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- warp[playerid] = true;
- SetTimerEx("swarp", 100, false, "d", playerid);
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == 2 || newstate == 3)
- {
- if(warp[playerid])
- {
- ShowPlayerDialog(playerid, 2000, 0, "Detected", "Dont car warp/troll", "OK", "");
- }
- }
- return 1;
- }
- forward swarp(playerid);
- public swarp(playerid)
- {
- warp[playerid] = false;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement