SA-MP Forums Archive
playername help - 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: playername help (/showthread.php?tid=211196)



playername help - NewbBeginner - 14.01.2011

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


Re: playername help - Backwardsman97 - 14.01.2011

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";



Re: playername help - NewbBeginner - 14.01.2011

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


Re: playername help - Jochemd - 14.01.2011

Change it youself -.-


Re: playername help - NewbBeginner - 14.01.2011

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


Re: playername help - Jochemd - 14.01.2011

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


Re: playername help - Backwardsman97 - 14.01.2011

I'm pretty sure it won't work.


Re: playername help - Jochemd - 14.01.2011

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