SetPlayerName help!
#1

Hi! I need help with this:
Код:
CMD:specijalnoime(playerid, params[], help)
{
	JeliLogovan
	if(PlayerInfo[playerid][pAdmin] < 6) return NematePravo
	if(AdminDuznost[playerid] == 0) return NisteAD
	new id, ime, msg1[128], msg2[128], msg3[128];
	if(sscanf(params, "us[16]", id, ime)) return SCM, "[ E ] | {FFFFFF}Koristenje: /promjeniime {ffdf2d}[ID] [IME].");
	else
	{
		if(id == INVALID_PLAYER_ID) return NemaIgraca
		PlayerInfo[id][pSIme] = ime;
		SetPlayerName(id, ime);
		format(msg1, sizeof(msg1), "[ E ] | {FFFFFF}Igracu {ffdf2d}%s {ffffff}ste postavili specijalno ime na {ffdf2d}%s.", ImeIgraca(id), ime);
		format(msg2, sizeof(msg2), "[ E ] | {FFFFFF}Vlasnik {ffdf2d}%s {ffffff}vam je postavio specijalno ime na {ffdf2d}%s.", ImeIgraca(playerid), ime);	
		format(msg3, sizeof(msg3), "[ E ] | {FFFFFF}Svaki put kada ulazite na server, koristite ime {ffdf2d}%s, {ffffff}server ce vam automatski postaviti specijalno ime.", ImeIgraca(id));
		SendClientMessage(playerid, ZUTA, msg1);
		SendClientMessage(id, ZUTA, msg2);
		SendClientMessage(id, ZUTA, msg3);
	}
	return 1;
}
I get an error at the line "SetPlayerName(id, ime);" saying argument type mismatch (argument 2).
Now, I know what's my mistake, but how else should i write it?
Reply
#2

new name[MAX_PLAYER_NAME],
SetPlayerName(playerid, name);
Reply
#3

OMG how didn't I notice that, I can't believe... Thank you :P
Reply
#4

no problem
Reply
#5

Now I get the error must be assigned to an array
at the line:
Код:
PlayerInfo[id][pSIme] = ime;
Reply
#6

pSime needs to be a string.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)