new Text3D:giPlayerStatus[ MAX_PLAYERS ]; zcmd(state, playerid, params[]) { if( !IsPlayerConnected( playerid ) ) return 0; if( !sscanf( params, "s[32]", params[ 0 ] ) ) { new szFormat[ 2 ][ 50 ]; format( szFormat[ 0 ], 31, "%s", params[ 0 ] ); format( szFormat[ 1 ], 49, "State: %s.", szFormat[ 0 ] ); SendClientMessageEx( playerid, COLOR_GRAD2, szFormat[ 1 ] ); Delete3DTextLabel( giPlayerStatus[ playerid ] ); giPlayerStatus[ playerid ] = Create3DTextLabel( szFormat[ 0 ], 0x68EA6CFF, 1.0, 1.0, 1.0, 15.0, 0, 1 ); Attach3DTextLabelToPlayer( giPlayerStatus[ playerid ], playerid, 0.0, 0.0, 0.3 ); } return 1; } zcmd(qstate, playerid, params[]) { if( !IsPlayerConnected( playerid ) ) return 0; Delete3DTextLabel( giPlayerStatus[ playerid ] ); SendClientMessageEx( playerid, COLOR_GRAD2, "State have been removed." ); return 1; } |
new Text3D:giPlayerStatus[MAX_PLAYERS] = {-1,...};
zcmd(state,playerid,params[])
{
if(!sscanf(params,"s[32]",params[0]))
{
new szFormat[50];
format(szFormat,sizeof szFormat,"State: %s.",params[0]);
SendClientMessageEx(playerid,COLOR_GRAD2,szFormat);
Delete3DTextLabel(giPlayerStatus[playerid]);
giPlayerStatus[playerid] = Create3DTextLabel(szFormat,0x68EA6CFF,1.0,1.0,1.0,15.0,0,1);
Attach3DTextLabelToPlayer(giPlayerStatus[playerid],playerid,0.0,0.0,0.3);
}
return 1;
}
zcmd(qstate,playerid,params[])
{
Delete3DTextLabel(giPlayerStatus[playerid]);
giPlayerStatus[playerid] = Text3D:-1;
SendClientMessageEx(playerid,COLOR_GRAD2,"State have been removed.");
return 1;
}
Hello!
![]() Try this: PHP код:
|
giPlayerStatus[playerid] = -1;
giPlayerStatus[playerid] = -1;
giPlayerStatus[playerid] = Text3D:-1;
PHP код:
PHP код:
|
new Text3D:giPlayerStatus[MAX_PLAYERS] = {-1,...};
#undef INVALID_3DTEXT_ID
#define INVALID_3DTEXT_ID Text3D:0xFFFF
new Text3D:giPlayerStatus[MAX_PLAYERS] = {-1,...};
new Text3D:giPlayerStatus[MAX_PLAYERS] = {INVALID_3DTEXT_ID, ...};
giPlayerStatus[playerid] = Text3D:-1;
giPlayerStatus[playerid] = INVALID_3DTEXT_ID;