playerid not loading
#1

PHP код:
    if(Character[playerid][BrutalM] == 1)
    {
        
Character[playerid][CanAccept] = 0;
        
SetPlayerPos(playeridCharacter[playerid][DPosX], Character[playerid][DPosY], Character[playerid][DPosZ]+1);
        
SetTimerEx("AcceptD"120000false"i"playerid);
        
TogglePlayerControllable(playeridfalse);
        
SetTimerEx("ConBrutal"5000false"i"playerid);
        
SetPlayerHealth(playerid15.0);
        
format(DTextSsizeof(DTextS), "(( %s has been injuried several times. /damages %s for more info. ))"GetName(playerid), playerid);
        
label Create3DTextLabel(DTextSCOLOR_REDCharacter[playerid][DPosX], Character[playerid][DPosY], Character[playerid][DPosZ], 10.00);
        
Attach3DTextLabelToPlayer(labelplayerid000.7);
    } 
What is wrong with this?
PHP код:
format(DTextSsizeof(DTextS), "(( %s has been injuried several times. /damages %s for more info .))"GetName(playerid), playerid); 
Here is how it looks:

Reply
#2

By the way the names load correctly, that was just a bug. It's just the playerid's that aren't loading correctly.
Reply
#3

Playerids are integers.... Use %i instead of %s for the second value.

Код:
format(DTextS, sizeof(DTextS), "(( %s has been injuried several times. /damages %i for more info. ))", GetName(playerid), playerid);
Reply
#4

Change your %s into %i
Reply
#5

Change %s to %d
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)