Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- #if defined FILTERSCRIPT
- #define SetCarLockedState SetVehicleParamsForPlayer
- #define ERROR 0xAA3333AA
- #define SUCCESS 0xFFFF00AA
- public OnFilterScriptInit()
- {
- print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=");
- print("-=-=-=-=-=-[Simple Car Lock System]-=-=-=-=-=");
- print("-=-=-=-=-=-[By: [p3]pr0t0typ3]=-=-=-=");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=");
- print("-=-=-=-=-=-[Simple Car Lock System]-=-=-=-=-=");
- print("-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=");
- }
- #endif
- public OnGameModeInit()
- {
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- CMD:lockveh(playerid, params[])
- {
- #pragma unused params
- if(IsPlayerAdmin(playerid))//remove me for NON rcon support
- {//remove me for NON rcon support
- if(IsPlayerInAnyVehicle(playerid))
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- SetCarLockedState(GetPlayerVehicleID(playerid),i,false,true);
- SendClientMessage(playerid,SUCCESS,"Your car has been locked!");
- return 1;
- }
- else return SendClientMessage(playerid,ERROR,"ERROR: You need to be in a vehicle");
- }
- else return SendClientMessage(playerid,ERROR,"ERROR: You are not logged into RCON.");
- }
- CMD:unlockveh(playerid, params[])
- {
- #pragma unused params
- if(IsPlayerAdmin(playerid)) {//remove me for NON rcon support
- if(IsPlayerInAnyVehicle(playerid))
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- SetCarLockedState(GetPlayerVehicleID(playerid),i,false,false);
- SendClientMessage(playerid,SUCCESS,"Your car has been unlocked!");
- return 1;
- }
- else return SendClientMessage(playerid,ERROR,"ERROR: You need to be in a vehicle to unlock the doors");
- }
- else return SendClientMessage(playerid,ERROR,"ERROR: You are not logged into RCON.");
- }
Advertisement
Add Comment
Please, Sign In to add comment