Need Help in Shooting a player - 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: Need Help in Shooting a player (
/showthread.php?tid=583324)
Need Help in Shooting a player -
MaxJohnson - 27.07.2015
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
AW: Need Help in Shooting a player -
Mencent - 27.07.2015
Hello!
I don't understand what you want.
Are you have any code for us?
Can you try to explain it again?
Re: Need Help in Shooting a player -
MaxJohnson - 27.07.2015
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
AW: Need Help in Shooting a player -
Mencent - 27.07.2015
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;
}