14.02.2014, 09:50
So,i have a jail system but this is used for /ajail and i want to use it just for gates.
The problem is that the system is made for admins, IsPlayerAdmin and i want to switch it to IsACop.
I changed it,defined,no errors,but in game the cmds don`t work.So,anyone who can help,rep+.
Thanks!
Here`s the code:
The problem is that the system is made for admins, IsPlayerAdmin and i want to switch it to IsACop.
I changed it,defined,no errors,but in game the cmds don`t work.So,anyone who can help,rep+.
Thanks!
Here`s the code:
Код:
//Gates Commands: #define FILTERSCRIPT #include <a_samp> #include <zcmd> #define MAX_GATES 4 #define red 0xFF0000C8 #define orange 0xFF8000C8 #define IsACop ........................................ CMD:gatesinfo(playerid,params[]) { if(!IsACop(playerid)) { return SendClientMessage(playerid,red,"You're not allowed to use this command."); } else { SendClientMessage(playerid,red,"/jailmain - Poarta principala"); SendClientMessage(playerid,red,"/jailp - Poarta prizonierilor"); SendClientMessage(playerid,red,"/jailguard - Poarta securitatii"); SendClientMessage(playerid,red,"/jailcar - Poarta masini"); } return 1; } CMD:jailmain(playerid,params[]) { if(!IsACop(playerid)) return SendClientMessage(playerid,red,"You're not allowed to use this command."); else switch(Open{0}) { case true: { MoveObject(Gate[0],288.21933, 1411.60046, 6.55341,10); Open{0} = false; } case false: { MoveObject(Gate[0],288.21933, 1411.60046, 12.11350,10); Open{0} = true; } } return 1; } CMD:jailp(playerid,params[]) { if(!IsACop(playerid)) return SendClientMessage(playerid,red,"You're not allowed to use this command."); else switch(Open{1}) { case true: { MoveObject(Gate[1],205.2051, 1425.8093, 6.33434,10); Open{1} = false; } case false: { MoveObject(Gate[1],205.0506, 1425.8093, 10.8416,10); Open{1} = true; } } return 1; } CMD:gateguard(playerid,params[]) { if(!IsACop(playerid)) return SendClientMessage(playerid,red,"You're not allowed to use this command."); else switch(Open{2}) { case true: { MoveObject(Gate[2],276.7187, 1392.7837, 6.3300,10); Open{2} = false; } case false: { MoveObject(Gate[2],276.71869, 1392.78369, 10.67510,10); Open{2} = true; } } return 1; } CMD:gatecars(playerid,params[]) { if(!IsACop(playerid)) return SendClientMessage(playerid,red,"You're not allowed to use this command."); else switch(Open{3}) { case true: { MoveObject(Gate[3],269.75021, 1413.76233, 10.15275,10); Open{3} = false; } case false: { MoveObject(Gate[3],269.7502, 1413.7623, 8.6981 ,10); Open{3} = true; } } return 1; }