SA-MP Forums Archive
/frisk 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: /frisk cmd (/showthread.php?tid=390132)



/frisk cmd - stix - 04.11.2012

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;
    }
Can someone tell me how to make it so the officer can see all the weapons the chosen id has ?

I really don't get the GetPlayerWeaponData thing lol