Posts: 716
Threads: 92
Joined: May 2018
So, i have a problem blocking the player from choosing cop team if wanted.
I placed this on OnPlayerRequestSpawn:
pawn Код:
if(GetPlayerWantedLevel(playerid) >= 1 && gTeam[playerid][TEAM_COP]) return SendClientMessage(playerid, COLOR_RED, "* You can't be a Law Enforcement Officer while wanted.");
But doesn't work. Basically, i don't want players use cop team if they have a wanted level. Thanks.
Posts: 716
Threads: 92
Joined: May 2018
Quote:
Originally Posted by iLearner
This code goes somewhere under OnPlayerRequestClass if I am not mistaken and it goes like
PHP код:
if(GetPlayerWantedLevel(playerid) >= 1 && classid == TEAM_COP) return SendClientMessage(playerid, COLOR_RED, "* You can't be a Law Enforcement Officer while wanted.");
|
Eh no, perchи in quel modo ogni volta che switcho classe nella selezione, mi appare quel messaggio ma posso comunque spawnarmi come poliziotto. Invece dovrebbe andare su OnPlayerRequestSpawn in modo da bloccarlo, ma non so come. :S
Posts: 579
Threads: 18
Joined: Apr 2017
Reputation:
0
return 0 dovrebbe aiutarti.
Se non funziona aspetta che arrivo a casa e telo dick per bene.
Posts: 716
Threads: 92
Joined: May 2018
Provato, non funziona. Bisogna fare come ho detto io..
Posts: 716
Threads: 92
Joined: May 2018
Posts: 716
Threads: 92
Joined: May 2018
Posts: 716
Threads: 92
Joined: May 2018
Your wanted level check must be > 1.
Also, where do i have to place that code?