SA-MP Forums Archive
Will this work? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Will this work? (/showthread.php?tid=126175)



Will this work? - Rubennnnn - 07.02.2010

I've got this:
pawn Код:
if(GetPlayerSkin(playerid) == 161 || 162 || 32 || 34 || 31 || 200 || 201 || 160 || 159 || 158)
    GameTextForPlayer(playerid, "~g~Farmer~n~", 10000, 6);
    GameTextForPlayer(playerid, "~y~Objective: Protect the tractor", 10000, 3);
and my question is if it will work.


Re: Will this work? - Butilka - 07.02.2010

Код:
if(GetPlayerSkin(playerid) == 161 || 162 || 32 || 34 || 31 || 200 || 201 || 160 || 159 || 158)
This is not correct.
Is should be
Код:
if(GetPlayerSkin(playerid) == 161 || GetPlayerSkin(playerid) == 162 || GetPlayerSkin(playerid) == 32 || GetPlayerSkin(playerid) == 34 || GetPlayerSkin(playerid) == 31 || GetPlayerSkin(playerid) == 200 || GetPlayerSkin(playerid) == 201 || GetPlayerSkin(playerid) == 160 || GetPlayerSkin(playerid) == 159 || GetPlayerSkin(playerid) == 158)



Re: Will this work? - ettans - 07.02.2010

pawn Код:
if(GetPlayerSkin(playerid) == 161 || GetPlayerSkin(playerid) == 162 || GetPlayerSkin(playerid) == 32 || GetPlayerSkin(playerid) == 34 || GetPlayerSkin(playerid) == 31 || GetPlayerSkin(playerid) == 200 || GetPlayerSkin(playerid) == 201 || GetPlayerSkin(playerid) == 160 || GetPlayerSkin(playerid) == 159 || GetPlayerSkin(playerid) == 158)
{
  GameTextForPlayer(playerid, "~g~Farmer~n~", 10000, 6);
  GameTextForPlayer(playerid, "~y~Objective: Protect the tractor", 10000, 3);
}



Re: Will this work? - Rubennnnn - 07.02.2010

Hmm I've tried and it doesn't show the first GameTextForPlayer..


Re: Will this work? - ettans - 07.02.2010

Of course it doesn't, since you can't use 2 GameText's at the same time.


Re: Will this work? - Rubennnnn - 07.02.2010

Quote:
Originally Posted by Ettans
Of course it doesn't, since you can't use 2 GameText's at the same time.
Hmm. Didn't know that


Re: Will this work? - ettans - 07.02.2010

You can use textdraws instead, as you can have multiple textdraws showing simultaneously.


Re: Will this work? - Nero_3D - 07.02.2010

Or you just put the gametext's together


Re: Will this work? - ettans - 07.02.2010

Quote:
Originally Posted by ♣ Joker ♠
Or you just put the gametext's together
Yeah.

pawn Код:
GameTextForPlayer(playerid, "~g~Farmer~n~~y~Objective: Protect the tractor", 10000, 6);



Re: Will this work? - Rubennnnn - 07.02.2010

Quote:
Originally Posted by Ettans
Quote:
Originally Posted by ♣ Joker ♠
Or you just put the gametext's together
Yeah.

pawn Код:
GameTextForPlayer(playerid, "~g~Farmer~n~~y~Objective: Protect the tractor", 10000, 6);
Yeah did that already