Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // mascii's simple anti-vehicle FS
- #include <a_samp>
- #define FILTERSCRIPT
- #define COLOR_GREY 0xAFAFAFAA
- new antiv;
- //0 = off
- //1 = on
- public OnFilterScriptInit()
- {
- antiv = 1;
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_PASSENGER || PLAYER_STATE_DRIVER)
- {
- if (antiv == 0)
- {
- RemovePlayerFromVehicle(playerid);
- }
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/antiv on", true) == 0)
- {
- if (IsPlayerAdmin(playerid) == 1)
- {
- SendClientMessageToAll(COLOR_GREY,"Admin has turned the use of Vehicles on");
- antiv = 1;
- }
- return 1;
- }
- if(strcmp(cmdtext, "/antiv off", true) == 0)
- {
- if (IsPlayerAdmin(playerid) == 1)
- {
- SendClientMessageToAll(COLOR_GREY,"Admin has turned the use of Vehicles off");
- antiv = 0;
- }
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment