Restriction cmd - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Restriction cmd (
/showthread.php?tid=664567)
Restriction cmd -
Cordyandrey - 04.03.2019
I can not do it to use the command only when the player has his hands raised (use /handsup).
What I did wrong?
When player use comand say to me: "acel player trebuie sa ridice mainile" (he must use handsup)
Код:
YCMD:confiscate(playerid, params[], help) {
if(!IsACop(playerid)) return SCM(playerid, COLOR_GREY, "Nu faci parte din factiunea politiei.");
if(OnDuty[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece nu esti la datorie!");
new item[15],id,string[180],query[180];
if(sscanf(params, "us[15]",id,item)) {
SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/confiscate <playerid/name> <item>");
SCM(playerid, COLOR_WHITE, "Items: Driving, Weapons, Drugs.");
return 1;
}
if(id != SPECIAL_ACTION_HANDSUP) return SCM(playerid, COLOR_GREY, "Acel player trebuie sa ridice mainile mai intai.");
if(id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");
Re: Restriction cmd -
Cordyandrey - 04.03.2019
And cmd: handsup
Код:
YCMD:handsup(playerid, params[], help) {
if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_GREY, "Nu poti folosi animatii in timp ce esti intr-un vehicul.");
if(Freezed[playerid] == 1) return 1;
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
return 1;
}
Re: Restriction cmd -
Private200 - 04.03.2019
Код:
YCMD:confiscate(playerid, params[], help) {
if(!IsACop(playerid)) return SCM(playerid, COLOR_GREY, "Nu faci parte din factiunea politiei.");
if(OnDuty[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece nu esti la datorie!");
new item[15],id,string[180],query[180];
if(sscanf(params, "us[15]",id,item)) {
SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/confiscate <playerid/name> <item>");
SCM(playerid, COLOR_WHITE, "Items: Driving, Weapons, Drugs.");
return 1;
}
if(GetPlayerSpecialAction(id) != SPECIAL_ACTION_HANDSUP) return SCM(playerid, COLOR_GREY, "Acel player trebuie sa ridice mainile mai intai.");
if(id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");