string to playerid - 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: string to playerid (
/showthread.php?tid=77804)
string to playerid -
Rks25 - 14.05.2009
i want to store a string to a playerid.
like i got "sucker" and i want to store that string to a playerid. How to do that?
short example needed.
Re: string to playerid -
MenaceX^ - 14.05.2009
I don't get it, try to have a better explanation.
Re: string to playerid -
Rks25 - 14.05.2009
like i want this.
MenaceX joins to my server, i do /sucker 0(ID 0 is your id)
it will set "Sucker" to your playerid.
And when i do /stats 0, i see Admins opinion: "Sucker".
Re: string to playerid -
Weirdosport - 14.05.2009
new PlayerMessage[MAX_PLAYERS][128];
To set someones sucker message..
PlayerMessage[playerid] = string of some kind
Using DCMD, you could have:
pawn Код:
dcmd_text(playerid, params[])
{
PlayerMessage[playerid] = params
}
Re: string to playerid -
Rks25 - 14.05.2009
so PlayerMessage[playerid] = "Sucker"; in this case?
Re: string to playerid -
Weirdosport - 14.05.2009
Quote:
Originally Posted by RKS_
so PlayerMessage[playerid] = "Sucker"; in this case?
|
Should work, I'll test what I said
Re: string to playerid -
Rks25 - 14.05.2009
oke i will wiat for your response than .
Re: string to playerid -
Weirdosport - 14.05.2009
I'm making a silly mistake somewhere along the line, I can't get rid of my:
error 047: array sizes do not match, or destination array is too small
Re: string to playerid -
MenaceX^ - 14.05.2009
--writing a code, hold.
nvm.
Re: string to playerid -
Rks25 - 14.05.2009
simple question how to reset this variable?
for(new l=0; l<MAX_PLAYERS; l++){
PlayerMessage[l][playerid] = 0;
}