#1

Hello ! I got this script: http://pastebin.com/c8sKcYip. The problem is that it works for a player, if i'm right the playerid, but for the other player (pid) it says "No one comitted any illegal against you." even if someone did. Please help me with this problem. Thank you.
Reply
#2

Care to share the codes?
Reply
#3

Код:
	

    if(strcmp("/call 112", cmdtext, true) == 0)
    {
    new pid; if(IsPlayerConnected(pid) && IsPlayerConnected(playerid))
    {
    if(Cell[playerid] == 1 && Cell[pid] == 2)
    {
        Cell[playerid] = 0;
            Cell[pid] = 0;
            SendClientMessage(playerid, COLOR_RED, "PD: Thank you for reporting the illegal.");
            if(GetPlayerWantedLevel(pid) < 6)
            {
            if(pid != INVALID_PLAYER_ID) SetPlayerWantedLevel(pid, GetPlayerWantedLevel(pid) + 1);
        new string[128],name[MAX_PLAYERS];
        GetPlayerName(playerid, name, sizeof(name));
            format(string, sizeof(string), "Current wanted: %d, {FF0000}Reporter: %s {FF0000}Crime: Murder", GetPlayerWantedLevel(pid), name);
            SendClientMessage(pid, COLOR_YELLOW, string);
            return 1;
            }
            if(GetPlayerWantedLevel(pid) == 6)
            {
        new tmp[128],name[MAX_PLAYERS];
        GetPlayerName(playerid, name, sizeof(name));
        format(tmp, sizeof(tmp), "Current wanted: 6, {FF0000}Reporter: %s {FF0000}Crime: Murder", name);
            SendClientMessage(pid, COLOR_YELLOW, tmp);
            SetPlayerWantedLevel(pid, GetPlayerWantedLevel(pid) + 0);
            return 1;
            }
            SetTimerEx("Wanted", 1800000, false, "i", pid);
    }
    else
    {
    SendClientMessage(playerid, COLOR_WHITE, "No one comitted any illegal against you.");
    return 1;
    }}
    return 1;
    }
    ////////////////////////////////
    public OnPlayerDeath(playerid,killerid,reason)
    {
        if(killerid != INVALID_PLAYER_ID && playerid != INVALID_PLAYER_ID)
        {
        Cell[playerid] = 1;
        Cell[killerid] = 2;
            new str[128], playername[MAX_PLAYER_NAME];
            GetPlayerName(killerid, playername, sizeof(playername));
            format(str, sizeof(str), "%s killed you. You have 60 seconds to type /call 112.", playername);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
            SetTimerEx("Killcell",60000,false, "i", playerid);
            return 1;
            }
    return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)