Script Help
#1

When I write the command nothing happens.
What is the problem?

Код HTML:
if(strcmp(cmd, "/ta523", true) ==0 || strcmp(cmd, "/tazer333", true) ==0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Non puoi usare questo comando in auto!");
return 1;
}
if(KnockedDown[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "Non puoi muoverti.");
return 1;
}
if(PlayerTied[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Sei tazerato!");
return 1;
}
if(ReduceTime[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Aspetta 5 secondi prima di usare questo comando !");
return 1;
}
new suspect = GetClosestPlayer(playerid);
if(IsPlayerConnected(suspect))
{
if(PlayerCuffed[suspect] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " Il giocatore и Tazerato/Arrestato!");
return 1;
}
if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
{
if(gTeam[suspect] == 2)
{
SendClientMessage(playerid, COLOR_GREY, " Non sei un Poliziotto / FBI!");
return 1;
}
if(IsPlayerInAnyVehicle(suspect))
{
SendClientMessage(playerid, COLOR_GREY, " Il giocatore и in un veicolo!");
return 1;
}
GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new randt = random(4)+1;
if(randt == 1)
{
format(string, sizeof(string), "* %s tazera %s-a, ma fallisce.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
format(string, sizeof(string), "* Sei stato tazerato da %s per 10 secondi.", sendername);
SendClientMessage(suspect, COLOR_WHITE, string);
format(string, sizeof(string), "* Hai tazerato %s-a per 10 secondi.", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* %s spara il tazer a %s-a e lo colpisce.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(suspect, "~r~Tazerato", 2500, 3);
TogglePlayerControllable(suspect, 0);
ApplyAnimation(suspect,"PARACHUTE","FALL_skyDive_DIE",4.0,1,1,1,1,1);
ApplyAnimation(playerid,"ped","ARRESTgun",3.0,0,0,0,0,0);
PlayerCuffed[suspect] = 1;
PlayerCuffedTime[suspect] = 15;
ReduceTime[playerid] = 1;
SetTimerEx("ReduceTimer", 5000, false, "i", playerid);
}
} //(playerid, animlib[], animname[], Float:fS, opt1, opt2, opt3, opt4, opt5
else
{
SendClientMessage(playerid, COLOR_GREY, " Il giocatore non и vicino a te!");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Non sei un Poliziotto / FBI!");
}
}//not connected
return 1;
}
Reply


Messages In This Thread
Script Help - by alessio335 - 21.06.2017, 21:39
Re: Script Help - by Mic_H - 21.06.2017, 22:40
Re: Script Help - by alessio335 - 22.06.2017, 14:00
Re: Script Help - by JasonRiggs - 22.06.2017, 14:05
Re: Script Help - by alessio335 - 22.06.2017, 14:15
Re: Script Help - by alessio335 - 23.06.2017, 15:47
Re: Script Help - by saffierr - 24.06.2017, 02:01

Forum Jump:


Users browsing this thread: 1 Guest(s)