how to save city name? (Y_ini) - 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: how to save city name? (Y_ini) (
/showthread.php?tid=418645)
how to save city name? (on stats) -
TrueForYourSelf - 25.02.2013
So here is my question if I will save it as:
Код:
pInfo[playerid][City] = 1
So how I can set it show in /stats like city:LosSantos or something? How it's possibe?
Re: ****** how to save city name? (Y_ini) -
Hoss - 25.02.2013
if(pInfo[playerid][City] == 1) = Los Santos
Re: ****** how to save city name? (Y_ini) -
Rock - 25.02.2013
Ternary operator
Re: how to save city name? (Y_ini) -
TrueForYourSelf - 25.02.2013
Looked at that link what you gived dind't find nothing for this case!
Re: how to save city name? (Y_ini) -
Goldino - 25.02.2013
What do you mean?
Re: how to save city name? (Y_ini) -
TrueForYourSelf - 25.02.2013
when you tipe /stats it shows like:
City: Los Santos
So I saved it as [pInfo][playerid][City] = 1 but I need now to get from nummber 1 out to Los Santos City.. Get my point?
Re: how to save city name? (Y_ini) -
Rock - 25.02.2013
Quote:
Originally Posted by TrueForYourSelf
Looked at that link what you gived dind't find nothing for this case!
|
How could you not see? Is writted with big font, it's the first thing under that list.
"The ternary operator"
Re: how to save city name? (Y_ini) -
TrueForYourSelf - 25.02.2013
First of all did you get my question? Anyway thanks for that .. but that wasn't what I asked for! (Ye wrong explanation)
I have everything saved.. The thing what I want to get out is city name.. Such as Los Santos or San Fierro I dont need this Ternaty opereations... Or you didnt get it?
Re: how to save city name? (Y_ini) -
Rock - 25.02.2013
( pInfo[ playerid ][ City ] == 1 ) ? ( "Los Santos" ) : ( "Las venturas" );
Use:
pawn Код:
format( bla, 38, "Town: %s", ( pInfo[ playerid ][ City ] == 1 ) ? ( "Los Santos" ) : ( "Las venturas" ) );
Re: how to save city name? (Y_ini) -
TrueForYourSelf - 25.02.2013
Thanks mate