04.11.2012, 20:20
pawn Код:
CMD:frisk(playerid, params[])
{
new name[MAX_PLAYER_NAME], targetid, othername[MAX_PLAYER_NAME], string[128], string2[128];
if(PlayerData[playerid][LSPDRank] < 1 && PlayerData[playerid][FBIRank] < 1) return SendClientMessage(playerid, GRAY, "You must be a Trainee / Agent Trainee to use this command !");
if(PlayerData[playerid][Duty] == 0) return SendClientMessage(playerid, GRAY, "You are not on police duty ! ");
if(sscanf(params, "ii", targetid)) return SendClientMessage(playerid, GRAY, "Function : /frisk [ id ]");
if(PlayerData[playerid][LSPDRank] >= 1 && PlayerData[playerid][Duty] == 1 || PlayerData[playerid][FBIRank] >= 1 && PlayerData[playerid][Duty] == 1)
{
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(targetid, othername, sizeof(othername));
format(string, sizeof(string), "%s starts to check %s clothes for weapons / drugs.", name, othername);
ProxDetector(40.0, playerid, string, PURPLE, PURPLE, PURPLE, PURPLE, PURPLE);
format(string2, sizeof(string2), "[ - - - - - - - - - - %s results - - - - - - - - - - ]", othername);
SendClientMessage(playerid, GREEN, string2);
return 1;
}
return 1;
}
I really don't get the GetPlayerWeaponData thing lol