SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 29/10/2009, 05:46 PM   #1
(.Aztec);
Huge Clucker
 
Join Date: Mar 2009
Posts: 425
Reputation: 2
Default 3DTextLabel help?

Here's my OnPlayerSpawn..

pawn Code:
public OnPlayerSpawn(playerid)
{
    new string[128];
    new spawnrand = random(sizeof(HospitalSpawns));
    if(SInfo[playerid][Admin] > 0)
    {
        format(string, sizeof(string), "Administrator LVL: %d", SInfo[playerid][Admin]);
        lol[playerid] = Create3DTextLabel(string, red, 0,0,0, 40.0, 0, 1);
        GetPlayerPos(playerid, X, Y, Z);
        Attach3DTextLabelToPlayer(lol[playerid], playerid, X, Y, Z+0.3);
    }
    if(Died[playerid] == 1)
    {
        SendClientMessage(playerid, orange, "You have been critically injured, $100 dollars has been taken for your hospital bill.");
        SGivePlayerMoney(playerid, -100);
        SetPlayerSkin(playerid,SInfo[playerid][Skin]);
        SetPlayerPos(playerid,HospitalSpawns[spawnrand][0],HospitalSpawns[spawnrand][1],HospitalSpawns[spawnrand][2]);
        SetPlayerFacingAngle(playerid,HospitalSpawns[spawnrand][3]);
        Died[playerid]=0;
    }
    SetPlayerSkin(playerid, SInfo[playerid][Skin]);
    SetPlayerArmour(playerid, 100);
    SetPlayerHealth(playerid, 100);
    GivePlayerWeapon(playerid, 22, 999999);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 200);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 200);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerInterior(playerid, SInfo[playerid][Interior]);
    TogglePlayerControllable(playerid, 1);
    return 1;
}

Well, the problem is: Sometimes it attaches the label, and other times, it doesn't.. It has something to do with not attaching whilst spawning. (I have a position saving script)
__________________
Account Inactive

(.Aztec); will no longer be used by me. I am changing my username to an old forum account i've had registered for a while, but never used.

My username has been changed to Sky4D
(.Aztec); is offline  
 

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
3dtextlabel lag r9x Scripting Help 2 17/03/2012 11:44 AM
Help 3DTextLabel Ro[X]y Help Archive 5 12/03/2010 06:16 PM
3dtextlabel bartje01 Help Archive 3 28/02/2010 07:50 AM
3dtextlabel for a car adytzu32 Help Archive 5 02/02/2010 04:33 PM
Help with 3DTextLabel Laconcha Help Archive 1 20/01/2010 03:03 PM


All times are GMT. The time now is 04:40 AM.


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