SA-MP Forums Archive
playerid not loading - 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: playerid not loading (/showthread.php?tid=634438)



playerid not loading - aoky - 19.05.2017

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:




Re: playerid not loading - aoky - 19.05.2017

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


Re: playerid not loading - Sew_Sumi - 19.05.2017

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);



Re: playerid not loading - zedshadowzw - 19.05.2017

Change your %s into %i


Re: playerid not loading - Mohaaaaaaaaaaa - 19.05.2017

Change %s to %d