playername help
#1

How can i do that carinfo[id][owner] = GetplayerName(playerid);
Reply
#2

You couldn't do it like that because pawn doesn't support three dimensional arrays. You could do a separate variable to handle just the names like this.

pawn Код:
new CarName[max_cars][24];

//Example
CarName[carid] = "BillyBob";
Reply
#3

I don't want this..
I want like teh Carowner name is GETPLAYERNAME, not that carname is GETPLAYERNAME
Reply
#4

Change it youself -.-
Reply
#5

How, it gives me warning if I do CarInfo[id][Owner] = getpname(playerid)
Reply
#6

pawn Код:
GetPlayerName(playerid,Playername,sizeof(Playername));
format(CarInfo[id][Owner],MAX_PLAYER_NAME,"%s",Playername);
Change that 'id' to the way you use that script though
Reply
#7

I'm pretty sure it won't work.
Reply
#8

Yeah, I mis-readed, but this works in case he is using an enum.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)