[HELP] On player death.
#1

Hello, i'm making an Cops Vs Criminals script.
but if an Cop die i wanna set him back to Civilian thats working, but i want him send a message to be cop again.

this are my script things

pawn Код:
#define team_lspd   1 // team to design lspd officers
#define team_civ    2 // team to design civilians
#define team_criminal 3 //team to design criminals

new pTeam[MAX_PLAYERS];
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason); // Shows the kill in the killfeed/deathlog/death window

    if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
    {
        pScore[killerid]++;
        SetPlayerScore(killerid, pScore[killerid]);

        pCash[killerid] += 100;
        GivePlayerMoney(killerid, 100);
    }

    // Outside the check, handle stuff for playerid
    // if killerid was INVALID_PLAYER_ID the player killed themselves (i.e. falling)

    pDeaths[playerid]++;
    pCash[playerid] -= 100;
    pScore[playerid]--;
    SetPlayerScore(playerid, pScore[playerid]);
    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid, pCash[playerid]);
    return 1;
}

    if(pTeam[playerid] = team_lspd);
    {
        SendClientMessage(playerid, COLOR_WHITE, "You're now back a Civilian, type /cop to be back a cop!");
    return 1;
}
Can someone help me ;d

Greetz
Reply
#2

why nobody helps me!?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)