string to playerid
#1

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

I don't get it, try to have a better explanation.
Reply
#3

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".
Reply
#4

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
}
Reply
#5

so PlayerMessage[playerid] = "Sucker"; in this case?
Reply
#6

Quote:
Originally Posted by RKS_
so PlayerMessage[playerid] = "Sucker"; in this case?
Should work, I'll test what I said
Reply
#7

oke i will wiat for your response than .
Reply
#8

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

--writing a code, hold.
nvm.
Reply
#10

simple question how to reset this variable?

for(new l=0; l<MAX_PLAYERS; l++){
PlayerMessage[l][playerid] = 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)