27.11.2009, 03:16
I've been trying to create a /afk command with textdraws, but when when I try and do it just fails. If I add ,pName at the end of the textdraw it says number of arguments does not match definition, and when I leave it just %s is AFK! It just says simply "%s" and not the name. Help please? 

Код:
{ if(strcmp("/afk",cmdtext, true) == 0) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,sizeof(pName)); TextDrawShowForAll(IsAFK); TogglePlayerControllable(playerid,0); return 1; }
Код:
IsAFK = TextDrawCreate(260.000000,222.000000,"%s is now AFK!"); TextDrawAlignment(IsAFK,0); TextDrawBackgroundColor(IsAFK,0x000000ff); TextDrawFont(IsAFK,3); TextDrawLetterSize(IsAFK,0.599999,1.900000); TextDrawColor(IsAFK,0xff0000ff); TextDrawSetOutline(IsAFK,1); TextDrawSetProportional(IsAFK,1); TextDrawSetShadow(IsAFK,1)