Help needed of an advanced scripter
#1

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)