Jump to content
  • 0

pomoc Změna nicku - něco + stálý nick


ForestCZE

Dotaz

Zdravim, potreboval bych poradit s jednou prkotinou netusim, kde je chyba. Mám příkaz AFK a chci přidat, že mu to před nick hodí [AFK]

 

Script vypadá takto:

 

StalyNick[playerid] = PlayerName(playerid);
format(fnick, sizeof(fnick), "[AFK]%s",StalyNick[playerid]);
SetPlayerName(playerid, fnick);

 

Error:

 

new.pwn(936) : error 006: must be assigned to an array

 

936:

StalyNick[playerid] = PlayerName(playerid);

 

Díky předem za pomoc ;)

Link to comment
Share on other sites

8 odpovědí na tuto otázku

Recommended Posts

  • 0

StalyNick[MAX_PLAYER_NAME][playerid] = PlayerName(playerid);

 

new.pwn(936) : error 032: array index out of bounds (variable "StalyNick")

new.pwn(936) : error 006: must be assigned to an array

Link to comment
Share on other sites

  • 0
skus

new string[25];

format(string,25,"%s",PlayerName(playerid));

 

StalyNick[MAX_PLAYER_NAME][playerid] = string;

 

new afktext[128];
TogglePlayerControllable(playerid,false);
StalyNick[MAX_PLAYER_NAME][playerid] = PlayerName(playerid);
format(afktext, sizeof(afktext), "%s je nyní AFK [Pryč]",PlayerName(playerid));
SendClientMessageToAll(ZLUTA, afktext);

 

Takže jak?

Link to comment
Share on other sites

  • 0

new afktext[128];

TogglePlayerControllable(playerid,false);

format(afktext, sizeof(afktext), "%s",PlayerName(playerid));

StalyNick[MAX_PLAYER_NAME][playerid] = afktext;

format(afktext, sizeof(afktext), "%s išiel AFK ! [/AFK]",PlayerName(playerid));

SendClientMessageToAll(ZLUTA, afktext);

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...