SA-MP Forums Archive
Help needed of an advanced scripter - 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: Help needed of an advanced scripter (/showthread.php?tid=339006)



Help needed of an advanced scripter - speediekiller2 - 01.05.2012

Hello,

How do i get 2 names in a string so the playerid and the clickedplayerid in a code like this:
Код:
new string[64], pName[MAX_PLAYER_NAME];
    	GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    	format(string,sizeof string,"%s has joined the server. Welcome!",pName);
    	SendClientMessageToAll(0xFFFFFFAA,string);
thnx for all your help greetz, speediekiller2


Re: Help needed of an advanced scripter - FalconX - 01.05.2012

What do you mean by clickedplayerid ?

Edit: Oh ok I got it you meant on OnPlayerClickPlayer

pawn Код:
new string[80], pName[MAX_PLAYER_NAME], Fname[MAX_PLAYER_NAME];
GetPlayerName(clickedplayerid, Fname, sizeof(Fname));
GetPlayerName(playerid, pName, sizeof(pName));
format(string,sizeof string,"Player: %s and Clicked Player: %s",pName, Fname); // you could change the text inside if you want.
        SendClientMessageToAll(-1,string);
I would write even more better but I am not on pc ATM.

-FalconX