"&&" question
#9

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
Just to explain to wufs that his code is wrong and Max_Coldheart's was good
PHP код:
return (GetPlayerWantedLevel(playerid) >= 0SendClientMessage(playerid,RED," You are wanted!") : SendClientMessage(playerid,GREEN," OK!"); 
So if player's wanted level is 0 he is wanted?
Max wasnt wrong with his code. That would actually work.
pawn Код:
CMD:kill(playerid, params[]) return if(GetPlayerWantedLevel(playerid, >= 1)) ? SendClientMessage(playerid, -1, "Can't use kill when wanted") : SetPlayerHealth(playerid, 0);
This will check if your wanted level is 1 or higher, if thats true, it will send the message. When it is 0, it will just kill you.
pawn Код:
if( (GetPlayerWantedLevel(playerid) >= 1 ) ?[THEN] SendClientMessage(playerid, ....) :[ELSE] SetPlayerHealth(playerid...);
Reply


Messages In This Thread
"&&" question - by SomebodyAndMe - 23.11.2011, 16:49
Re: "&&" question - by juraska - 23.11.2011, 16:52
Re: "&&" question - by wups - 23.11.2011, 16:55
Re: "&&" question - by Max_Coldheart - 23.11.2011, 16:58
Re: "&&" question - by wups - 23.11.2011, 17:20
Re: "&&" question - by Michael_P - 24.11.2011, 03:12
Re: "&&" question - by Wesley221 - 24.11.2011, 06:48
Re: "&&" question - by [MG]Dimi - 24.11.2011, 06:56
Re: "&&" question - by Wesley221 - 24.11.2011, 07:13
Respuesta: Re: "&&" question - by Donuts - 24.11.2011, 07:32

Forum Jump:


Users browsing this thread: 1 Guest(s)