Criminal records.
#1

Hello, i would like to make a total of 5 crime files for each player, which will be saved when logging off, and a cop can set each crime file by doing /setrecords ID fileid description, thing is, params aint working, and i don't know which function i need to create, so help me with this guys.

pawn Код:
CMD:setrecords(playerid, params[])
    {
    new targetid, name[MAX_PLAYER_NAME], othername[MAX_PLAYER_NAME], fileid;
    if(PlayerData[playerid][LSPDRank] < 3 && PlayerData[playerid][FBIRank] < 3) return SendClientMessage(playerid, GRAY, "You must be a Police Cadet / Sub Agent or higher to use this command !");
    if(PlayerData[playerid][Duty] == 0) return SendClientMessage(playerid, GRAY, "You're not on police duty !");
    if(sscanf(params, "ii", targetid, fileid, params)) return SendClientMessage(playerid, GRAY, "Function : /setrecords [ ID ] [ File ] [ Description ]");
    if(fileid < 1 || fileid > 5) return SendClientMessage(playerid, GRAY, "The available File ID's are 1-5 !");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, GRAY, "This player is not online !");
    if(PlayerData[playerid][Duty] == 1 && IsPlayerConnected(targetid) && PlayerData[playerid][LSPDRank] >= 3 && fileid == 1 || PlayerData[playerid][Duty] == 1 && IsPlayerConnected(targetid) && PlayerData[playerid][FBIRank] >= 3 && fileid == 1)
    {
    new string[128], message[128], string2[128];
    format(string, sizeof(string), "%s reports information in the radio, updating %s crime-files.", name, othername);
    ProxDetector(50.0, playerid, string, PURPLE, PURPLE, PURPLE, PURPLE, PURPLE);
    format(message, sizeof(message), "[ - - - - - - - - - - - - - - - %s Criminal-Files - - - - - - - - - - - - ]", othername);
    SendClientMessage(playerid, GREEN, message);
    format(string2, sizeof(string2), "[ Crime Records : %s ]");
    SendClientMessage(playerid, GRAY, string2);
    return 1;
    }
    return 1;
    }

pawn Код:
CMD:records(playerid, params[])
    {
    new targetid, name[MAX_PLAYER_NAME], othername[MAX_PLAYER_NAME];
    if(PlayerData[playerid][LSPDRank] < 3 && PlayerData[playerid][FBIRank] < 3) return SendClientMessage(playerid, GRAY, "You must be a Police Cadet / Sub Agent or higher to use this command !");
    if(PlayerData[playerid][Duty] == 0) return SendClientMessage(playerid, GRAY, "You're not on police duty !");
    if(sscanf(params, "ii", targetid)) return SendClientMessage(playerid, GRAY, "Function : /records [ ID ]");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, GRAY, "This player is not connected !");
    if(PlayerData[playerid][Duty] == 1 && IsPlayerConnected(targetid) && PlayerData[playerid][LSPDRank] >= 3 || PlayerData[playerid][Duty] == 1 && IsPlayerConnected(targetid) && PlayerData[playerid][FBIRank] >= 3)
    {
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(targetid, othername, sizeof(othername));
    new string[128], message[128], string2[128];
    format(string, sizeof(string), "%s takes out his police radio, asking the central for %s criminal-records.", name, othername);
    ProxDetector(50.0, playerid, string, PURPLE, PURPLE, PURPLE, PURPLE, PURPLE);
    format(message, sizeof(message), "[ - - - - - - - - - - - - - - - %s Criminal-Files - - - - - - - - - - - - ]", othername);
    SendClientMessage(playerid, GREEN, message);
    format(string2, sizeof(string2), "[ Crime Records : %s ]");
    SendClientMessage(playerid, GRAY, string2);
    return 1;
    }
    return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)