how to save city name? (Y_ini)
#1

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?
Reply
#2

if(pInfo[playerid][City] == 1) = Los Santos
Reply
#3

Ternary operator
Reply
#4

Looked at that link what you gived dind't find nothing for this case!
Reply
#5

What do you mean?
Reply
#6

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?
Reply
#7

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"
Reply
#8

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?
Reply
#9

( pInfo[ playerid ][ City ] == 1 ) ? ( "Los Santos" ) : ( "Las venturas" );

Use:
pawn Код:
format( bla, 38, "Town: %s", ( pInfo[ playerid ][ City ] == 1 ) ? ( "Los Santos" ) : ( "Las venturas" ) );
Reply
#10

Thanks mate
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)