23.06.2011, 21:12
Ok this is the problem...
The Pawn compiler button has worked every time... the only time it stops working is if i add this command:
If i don't have that in the script, compiler works alright...
Im new to scripting, so im wondering if this command would atleast work on the player, or if theres something wrong with the script...
(i've been on vacation, so i didn't script much, i forgot most of what i learned before, so i don't really know how to do these commands anymore where u do /cuff [id] or like /warn [id] [reason].)
The Pawn compiler button has worked every time... the only time it stops working is if i add this command:
pawn Код:
if(strcmp(cmdtext, "/cuff", true, 5) == 0) // '/cuff'
{
if(pFaction[playerid] == faction_army || pFaction[playerid] == faction_swat || pFaction[playerid] == faction_lspd || pFaction[playerid] == faction_ss)
{
new targetid = strval(params);
TogglePlayerControllable(targetid,0);
SendClientMessage(targetid, 0xFFFFCCAA, "You have been cuffed by a LEO.")
SendClientMessage(playerid, 0xFFFFCCAA, "You have cuffed a player.")
}
else
{
SendClientMessage(playerid, 0xFFFFCCAA, "You are not a leo !")
}
return 1;
}
Im new to scripting, so im wondering if this command would atleast work on the player, or if theres something wrong with the script...
(i've been on vacation, so i didn't script much, i forgot most of what i learned before, so i don't really know how to do these commands anymore where u do /cuff [id] or like /warn [id] [reason].)