SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 19/05/2017, 10:07 AM   #1
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Kildare, Ireland
Posts: 328
Reputation: 17
Default playerid not loading

PHP Code:
    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 Code:
format(DTextSsizeof(DTextS), "(( %s has been injuried several times. /damages %s for more info .))"GetName(playerid), playerid); 
Here is how it looks:

__________________
aoky is online now   Reply With Quote
Old 19/05/2017, 10:09 AM   #2
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Kildare, Ireland
Posts: 328
Reputation: 17
Default Re: playerid not loading

By the way the names load correctly, that was just a bug. It's just the playerid's that aren't loading correctly.
__________________
aoky is online now   Reply With Quote
Old 19/05/2017, 10:24 AM   #3
Sew_Sumi
High-roller
 
Join Date: Jun 2008
Posts: 4,720
Reputation: 323
Default Re: playerid not loading

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

Code:
format(DTextS, sizeof(DTextS), "(( %s has been injuried several times. /damages %i for more info. ))", GetName(playerid), playerid);
Sew_Sumi is offline   Reply With Quote
Old 19/05/2017, 12:18 PM   #4
zedshadowzw
Banned
 
Join Date: May 2017
Location: Los Santos lel
Posts: 44
Reputation: 3
Default Re: playerid not loading

Change your %s into %i
zedshadowzw is offline   Reply With Quote
Old 19/05/2017, 02:21 PM   #5
Mohaaaaaaaaaaa
Little Clucker
 
Join Date: Feb 2017
Posts: 38
Reputation: 2
Default Re: playerid not loading

Change %s to %d
__________________
Happy to help
Mohaaaaaaaaaaa is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GivePlayerMoney(playerid, PlayerInfo[playerid][pNovac]); Problem Theepiccoder Scripting Help 6 03/07/2016 02:13 PM
How does SendClientCheck(playerid, int, int, int, int) / OnClientCheckResponse(playerid, int, int, int) work? Gamer_Z Scripting Help 8 25/06/2016 11:09 AM
Saving and loading (playerid, health) Hyperfire Scripting Help 2 21/08/2012 12:46 AM
What's wrong with skins? GetPlayerSkin(playerid) & SetPlayerSkin(playerid, skin) McSquizzy Help Archive 7 16/04/2010 02:27 PM
Help with if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && Keeboo13 Help Archive 0 11/04/2010 05:38 AM


All times are GMT. The time now is 11:12 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.