12.02.2014, 18:35
Quote:
Ficarб por sua conta as verificaзхes.
pawn Код:
|
pawn Код:
CMD:createspike(playerid, params[])
{
new string[128], Float:Pos[4];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsACop(playerid) && !IsFBI(playerid) && !IsARES(playerid) && !IsAGov(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not a LEO.");
if(!PlayerInfo[playerid][pFacDuty]) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
if(PlayerInfo[playerid][pFacRank] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command. (Rank 4+)");
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
GetPlayerFacingAngle(playerid,Pos[3]);
CreateStrip(Pos[0], Pos[1], Pos[2],Pos[3]);
format(string, sizeof(string), "BCPD: %s has created a spike strip.", RPN(playerid));
SendCopMessage(COLOR_BLUE, string);
return 1;
}