DeletePlayer3DTextLabel
#18

Quote:
Originally Posted by [GF]Sasino97
View Post
Fix to this(there were a 3 or 4 errors) or it will give you an error like "Array has to be indexed", and another error with DeletePlayer3DTextLabel, it has to be Delete3DTextLabel, because afk is of type Text3D, not PlayerText3D, else it will give an error like "Argument type mismatch"

pawn Code:
new Text3D: afk[MAX_PLAYERS]; // at your top of script

COMMAND:afk(playerid, params[])
{
     new string[128], playerName[MAX_PLAYER_NAME];
     GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
     format(string, sizeof(string), "SERVER:%s is now in afk mode!", playerName);
     SendClientMessageToAll(blue, string);
     afk[playerid] = Create3DTextLabel("Player is afk!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
     Attach3DTextLabelToPlayer(afk[playerid], playerid, 0.0, 0.0, 0.7); // 1 error here
     TogglePlayerControllable(playerid, 0);
     return 1;
}
COMMAND:back(playerid, params[])
{
     new string[128], playerName[MAX_PLAYER_NAME];
     GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
     format(string, sizeof(string), "SERVER:%s has came back from being afk!", playerName);
     SendClientMessageToAll(blue, string);
     TogglePlayerControllable(playerid, 1);
     Delete3DTextLabel(playerid, afk[playerid]); // 2 Errors here
     return 1;
}
If there's another error, let me know
Will that delete the 3d text label if other players are afk

Im not at a computer at the moment, ill test it soon

Thanks

EDIT:Just 2 warnings,

(3854) : warning 213: tag mismatch
(3854) : warning 202: number of arguments does not match definition
This line
PHP Code:
     Delete3DTextLabel(playeridafk[playerid]); // 2 Errors here 
Quote:
Originally Posted by Jochemd
View Post
Can you actually script, tyler12?
LOOL gtfo
Reply


Messages In This Thread
DeletePlayer3DTextLabel - by tyler12 - 13.04.2012, 09:31
Re: DeletePlayer3DTextLabel - by Cjgogo - 13.04.2012, 09:36
Re: DeletePlayer3DTextLabel - by tyler12 - 13.04.2012, 09:37
Re: DeletePlayer3DTextLabel - by Hoss - 13.04.2012, 09:38
Re: DeletePlayer3DTextLabel - by tyler12 - 13.04.2012, 09:41
Re: DeletePlayer3DTextLabel - by Twisted_Insane - 13.04.2012, 10:29
Re: DeletePlayer3DTextLabel - by sampmark05 - 13.04.2012, 10:58
Re: DeletePlayer3DTextLabel - by taborda11 - 13.04.2012, 11:04
Re: DeletePlayer3DTextLabel - by sampmark05 - 13.04.2012, 11:05
Re: DeletePlayer3DTextLabel - by tyler12 - 13.04.2012, 12:26
Re: DeletePlayer3DTextLabel - by Twisted_Insane - 13.04.2012, 12:45
Re: DeletePlayer3DTextLabel - by tyler12 - 13.04.2012, 14:55
Re: DeletePlayer3DTextLabel - by Jochemd - 13.04.2012, 14:57
Re: DeletePlayer3DTextLabel - by Sasino97 - 13.04.2012, 15:03
Re: DeletePlayer3DTextLabel - by Torus - 13.04.2012, 15:03
Re: DeletePlayer3DTextLabel - by Sasino97 - 13.04.2012, 15:09
Re: DeletePlayer3DTextLabel - by Torus - 13.04.2012, 15:12
Re: DeletePlayer3DTextLabel - by tyler12 - 13.04.2012, 18:00

Forum Jump:


Users browsing this thread: 1 Guest(s)