Need Help in Shooting a player
#1

hello everyone please help me how can i make a system like a civilian shoot or punch cops he must get wanted level in my server i am killing cops but he doesent getting any wanted level so please help me in this thanks
Reply
#2

Hello!

I don't understand what you want.
Are you have any code for us?
Can you try to explain it again?
Reply
#3

i mean if a gteam civilian kill a gteam cops civilian must get wanted level or civilian shoot or punch a cops he also get wanted level
Reply
#4

Here you have a small example:
PHP код:
new gTeam[MAX_PLAYERS];//global
#define TEAM_CIVILIAN 1//define
#define TEAM_POLICE 2//define
//Set the team:
gTeam[playerid] = TEAM_CIVILIAN;//Player is now TEAM_CIVILIAN (1)
gTeam[playerid] = TEAM_POLICE;//Player is now TEAM_POLICE (2)
//Check (OnPlayerDeath)
if(killerid != INVALID_PLAYER_ID)
{
    if(
gTeam[playerid] == TEAM_POLICE && gTeam[killerid] == TEAM_CIVILIAN)
    {
        
SetPlayerWantedLevel(killerid,GetPlayerWantedLevel(killerid)+1);//killerid +1 wanted level
    
}
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)