SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 19/05/2017, 11:07 AM   #1
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Kildare, Ireland
Posts: 421
Reputation: 43
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:

__________________
ybn
aoky is offline   Reply With Quote
Old 19/05/2017, 11:09 AM   #2
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Kildare, Ireland
Posts: 421
Reputation: 43
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.
__________________
ybn
aoky is offline   Reply With Quote
Old 19/05/2017, 11:24 AM   #3
Sew_Sumi
High-roller
 
Join Date: Jun 2008
Posts: 4,958
Reputation: 369
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 online now   Reply With Quote
Old 19/05/2017, 01: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, 03:21 PM   #5
Mohaaaaaaaaaaa
Big Clucker
 
Join Date: Feb 2017
Posts: 55
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 03:13 PM
Saving and loading (playerid, health) Hyperfire Scripting Help 2 21/08/2012 01:46 AM
What's wrong with skins? GetPlayerSkin(playerid) & SetPlayerSkin(playerid, skin) McSquizzy Help Archive 7 16/04/2010 03:27 PM
Help with if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && Keeboo13 Help Archive 0 11/04/2010 06:38 AM


All times are GMT. The time now is 12:57 AM.


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