SA-MP Forums Archive
How to create a good Create3DTextLabel ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to create a good Create3DTextLabel ? (/showthread.php?tid=613448)



How to create a good Create3DTextLabel ? - Zeus666 - 27.07.2016

PHP код:
CMD:aduty(playerid, params[])
{
    new 
Text3D:adutyduty[MAX_PLAYERS];
    if (
pInfo[playerid][pAdminLevel] < 1)
        return 
SendClientMessage(playerid,COLOR_WHITE, "Nu esti Admin.");
    if (!
pInfo[playerid][pAdminDuty])
    {
        
adutyduty = Create3DTextLabel("ADMIN DUTY - NU TRAGE", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
        
Attach3DTextLabelToPlayer(playerid,adutyduty[playerid]);
        
SetPlayerColor(playerid,COLOR_PURPLE);
        
SetPlayerSkin(playerid,280);
        
pInfo[playerid][pAdminDuty] = 1;
        new 
string[128];
        
GetPlayerName(playerid, string, 24);
        
format(string, sizeof(string), "{FF0000} %s este acum Admin Duty. Foloseste (/report) pentru a cere ajutor" ,string);
        
SendClientMessageToAll(-1, string);
    }
    else
    {
        
SetPlayerColor(playerid, COLOR_WHITE);
        
SetPlayerSkin(playerid,NORMAL);
        
DeletePlayer3DTextLabel(playerid,adutyduty);
        
pInfo[playerid][pAdminDuty] = 0;
        new 
str[76], name[24];
        
GetPlayerName(playerid, name, 24);
        
format(str, sizeof(str), "{FF0000}%s nu mai este Admin Duty", name);
        
SendClientMessageToAll(COLOR_GREEN, str);
    }
    return 
1;
} 



(11) : error 033: array must be indexed (variable "adutyduty")
(12) : warning 213: tag mismatch
(12) : warning 213: tag mismatch
(12) : warning 202: number of arguments does not match definition
(12) : warning 202: number of arguments does not match definition
(12) : warning 202: number of arguments does not match definition
(27) : error 035: argument type mismatch (argument 2)


Re: How to create a good Create3DTextLabel ? - AlexPalermitano97 - 27.07.2016

delete [MAX_PLAYERS] and [playerid] and post error


Re: How to create a good Create3DTextLabel ? - Zeus666 - 27.07.2016

: warning 213: tag mismatch
: warning 213: tag mismatch
: warning 202: number of arguments does not match definition
: warning 202: number of arguments does not match definition
: warning 202: number of arguments does not match definition
: warning 213: tag mismatch


PHP код:
Attach3DTextLabelToPlayer(playerid,adutyduty);
DeletePlayer3DTextLabel(playerid,adutyduty);