Help out with 3dtextlabel
#1

PHP код:
    if(strcmp(cmd"/yo"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            new 
length strlen(cmdtext);
            while ((
idx length) && (cmdtext[idx] <= ' '))
            {
                
idx++;
            }
            new 
offset idx;
            new 
result[126];
            while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
            {
                
result[idx offset] = cmdtext[idx];
                
idx++;
            }
            
result[idx offset] = EOS;
            if(!
strlen(result))
            {
                
SendClientMessage(playeridGRIS"Uso: /yo [Location]");
                return 
1;
            }
            else
            {
                
format(stringsizeof(string), "|- [%d] %s -|",playeridresult);
            }
            new 
string2[128];
            if(
YoActivado[playerid] == 0)
            {
                
YO[playerid] = Create3DTextLabel(string,CELESTE,30.0,40.0,50.0,20.0,0);
                
Attach3DTextLabelToPlayer(YO[playerid], playerid0.00.00.40);
                
format(string2sizeof(string2), "New State: | %s | Use /yob to clear your current /yo.",result);
                
SendClientMessage(playeridCELESTEstring2);
                
printf("%s to update its state to %s",NombreJugador(playerid),result);
                
YoActivado[playerid] = 1;
                new 
y1,m1,d1;
                new 
h1,mi1,s1;
                
getdate(y1,m1,d1);
                
gettime(h1,mi1,s1);
                
format(stringsizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (state change): %s",d1,m1,y1,h1,mi1,s1,NombreJugador(playerid), result);
                
PublicLog(string);
            }
            else if(
YoActivado[playerid] == 1)
            {
                
SendClientMessage(playeridROJO_OSCURO"Use /yob to clear your current /yo.");
            }
        }
        return 
1;
    } 
PHP код:
    if(strcmp(cmd"/amb"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            new 
length strlen(cmdtext);
            while ((
idx length) && (cmdtext[idx] <= ' '))
            {
                
idx++;
            }
            new 
offset idx;
            new 
result[126];
            while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
            {
                
result[idx offset] = cmdtext[idx];
                
idx++;
            }
            
result[idx offset] = EOS;
            if(!
strlen(result))
            {
                
SendClientMessage(playeridGRIS"Uso: /envi [text]");
                return 
1;
            }
            else
            {
                
format(stringsizeof(string), "{33CCFF}|- {FF0000}Enviroment: {33CCFF}%s -|",result);
            }
            if(
AMBActivado[playerid] == 0)
            {
                new 
Float:RXFloat:RYFloat:RZ;
                
GetPlayerPos(playerid,RX,RY,RZ);
                
Delete3DTextLabel(AMB[playerid]);
                
AMB[playerid] = Create3DTextLabel(string,VERDE,RX,RY,RZ,30.0,0);
                
AMBActivado[playerid] = 1;
                
printf("%s updates his state to %s",NombreJugador(playerid),result);
                new 
y1,m1,d1;
                new 
h1,mi1,s1;
                
getdate(y1,m1,d1);
                
gettime(h1,mi1,s1);
                
format(stringsizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Enviroment): %s",d1,m1,y1,h1,mi1,s1,NombreJugador(playerid), result);
                
PublicLog(string);
            }
            else if(
AMBActivado[playerid] == 1)
            {
                
SendClientMessage(playeridROJO_OSCURO"Use /envia to erase your currently Enviroment.");
            }
        }
        return 
1;
    } 
These two commands randomly disappear after awhile I've tried many of things to fix it, any suggestions?
Reply


Messages In This Thread
Help out with 3dtextlabel - by Oh - 19.09.2011, 02:12
Re: Help out with 3dtextlabel - by =WoR=Varth - 19.09.2011, 14:10
Re: Help out with 3dtextlabel - by Oh - 19.09.2011, 14:17
Re: Help out with 3dtextlabel - by Fat - 19.09.2011, 14:18
Re : Help out with 3dtextlabel - by Naruto_Emilio - 19.09.2011, 14:21
Re: Help out with 3dtextlabel - by =WoR=Varth - 19.09.2011, 14:25
Re : Re: Help out with 3dtextlabel - by Naruto_Emilio - 19.09.2011, 14:31
Re: Help out with 3dtextlabel - by =WoR=G4M3Ov3r - 19.09.2011, 14:36
Re: Help out with 3dtextlabel - by Oh - 19.09.2011, 15:40
Re: Help out with 3dtextlabel - by Oh - 20.09.2011, 16:09

Forum Jump:


Users browsing this thread: 5 Guest(s)