SA-MP Forums Archive
Textdraw not appear on VPS - 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: Textdraw not appear on VPS (/showthread.php?tid=335001)



Textdraw not appear on VPS - jcvag44800 - 16.04.2012

Hi guys.

In my local server I have the "textdraw" displayed
But when I connect to my server, they are not displayed ...

Cordially


Re: Textdraw not appear on VPS - ViniBorn - 16.04.2012

You use plugins?


Re : Textdraw not appear on VPS - jcvag44800 - 16.04.2012

Yes, streamer (He was been load)


Re: Textdraw not appear on VPS - Christopher - 16.04.2012

Ensure that all the plugins you are using correspond with the operating system your VPS is using, although it shouldn't affect your textdraws; are you sure you haven't made a silly mistake and not uploaded the script to the VPS or something along them lines? If you are sure you have place some debugging messages in the section where the textdraw is created/shown to ensure the section of code is executing.


Re : Textdraw not appear on VPS - jcvag44800 - 16.04.2012

No errors detected


Re: Re : Textdraw not appear on VPS - Christopher - 16.04.2012

Quote:
Originally Posted by jcvag44800
Посмотреть сообщение
No errors detected
Have you tried debugging the script to check if it is executing?


Re : Textdraw not appear on VPS - jcvag44800 - 16.04.2012

Yes

Oh, OnPlayerSpawn(by print) not appaer oO
the "print" does not appear


Re : Textdraw not appear on VPS - jcvag44800 - 16.04.2012

Apparently, it only appears when you spawn after death oO

So there must be a problem in the first spawn of the VPS


Re: Re : Textdraw not appear on VPS - ViniBorn - 16.04.2012

Quote:
Originally Posted by jcvag44800
Посмотреть сообщение
Yes

Oh, OnPlayerSpawn(by print) not appaer oO
the "print" does not appear
Show me this


Re : Textdraw not appear on VPS - jcvag44800 - 16.04.2012

I correct, the print is displayed.
However, textdraw appear after death

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SpawnConnection[playerid] = 0;
    SendDeathMessage(killerid, playerid, reason);
    if(playerid == killerid)
    {
        PlayerInfo[playerid][pDeaths] ++;
    }
    else
    {
        PlayerInfo[playerid][pDeaths] ++;
        PlayerInfo[killerid][pKills] ++;
    }
    new newtext[256];
    format(newtext, sizeof(newtext), "Morts: ~g~%d", PlayerInfo[playerid][pDeaths]);
    TextDrawSetString(gInfoPlayerMO[playerid], newtext);
    TextDrawShowForPlayer(playerid, gInfoPlayerMO[playerid]);
    format(newtext, sizeof(newtext), "Kills: ~g~%d", PlayerInfo[killerid][pKills]);
    TextDrawSetString(gInfoPlayerKI[killerid], newtext);
    TextDrawShowForPlayer(playerid, gInfoPlayerKI[killerid]);
    if(PlayerInfo[playerid][pWorld] == 0)
    {
        GivePlayerMoney(playerid, -500);
        return 1;
    }
    else if(PlayerInfo[playerid][pWorld] == 1)
    {
        GivePlayerMoney(playerid, 25);
    }
    else if(PlayerInfo[playerid][pWorld] == 3)
    {
        GivePlayerMoney(playerid, -10);
    }
    else
    {
        GivePlayerMoney(playerid, -5);
    }
    return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(SpawnConnection[playerid] == 0)
    {
        if(PlayerInfo[playerid][pWorld] == 0)
        {
            randSpawn = random(sizeof(gRandomSpawns_LosSantos));
            SetPlayerPos(playerid,
            gRandomSpawns_LosSantos[randSpawn][0],
            gRandomSpawns_LosSantos[randSpawn][1],
            gRandomSpawns_LosSantos[randSpawn][2]);
            SetPlayerFacingAngle(playerid,gRandomSpawns_LosSantos[randSpawn][3]);
        }
        if(PlayerInfo[playerid][pWorld] == 1)
        {
            randSpawn = random(sizeof(gRandomSpawns_BaySide));
            SetPlayerPos(playerid,
            gRandomSpawns_BaySide[randSpawn][0],
            gRandomSpawns_BaySide[randSpawn][1],
            gRandomSpawns_BaySide[randSpawn][2]);
            SetPlayerFacingAngle(playerid,gRandomSpawns_BaySide[randSpawn][3]);
            SetPlayerHealth(playerid, 10000.0);
            SetTimerEx("AntiSpawnkill",5000, 0, "i", playerid);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid, 5, 1);
            GivePlayerWeapon(playerid, 16, 5);
            GivePlayerWeapon(playerid, 22, 9999);
            GivePlayerWeapon(playerid, 30, 9999);
        }
        if(PlayerInfo[playerid][pWorld] == 2)
        {
        }
        if(PlayerInfo[playerid][pWorld] == 3)
        {
           if(GetPlayerTeam(playerid) == 1)
           {
                SetPlayerPos(playerid,1896.5161,-2330.8054,13.5469);
           }
           if(GetPlayerTeam(playerid) == 2)
           {
                SetPlayerPos(playerid,413.6322,2533.5415,19.1484);
           }
        }
    }
    new newtext[512];
    PlayerInfo[playerid][pRatio] = PlayerInfo[playerid][pKills] / PlayerInfo[playerid][pDeaths];
    // Morts
    format(newtext, sizeof(newtext), "Morts: ~g~%d", PlayerInfo[playerid][pDeaths]);
    TextDrawSetString(gInfoPlayerMO[playerid], newtext);
    TextDrawShowForPlayer(playerid, gInfoPlayerMO[playerid]);
    // Kills
    format(newtext, sizeof(newtext), "Kills: ~g~%d", PlayerInfo[playerid][pKills]);
    TextDrawSetString(gInfoPlayerKI[playerid], newtext);
    TextDrawShowForPlayer(playerid, gInfoPlayerKI[playerid]);

    // Kills
    format(newtext, sizeof(newtext), "Ratio: %d", PlayerInfo[playerid][pRatio]);
    TextDrawSetString(gInfoPlayerRA[playerid], newtext);
    TextDrawShowForPlayer(playerid, gInfoPlayerRA[playerid]);

    new IP[16],file[256];
    if(AlreadyCo[playerid] == 0)
    {
        TextDrawShowForPlayer(playerid,Text:gWeb);
        TextDrawShowForPlayer(playerid,Text:gVersion);
        TextDrawShowForPlayer(playerid,Text:gCmd);
        AlreadyCo[playerid] = 1;
        // Connection
        format(newtext, sizeof(newtext), "Derniere connection: ~g~%02d/%02d/%02d  ~y~%02dH:%02d", PlayerInfo[playerid][pLastDay],PlayerInfo[playerid][pLastMonth],PlayerInfo[playerid][pLastYear],PlayerInfo[playerid][pLastHour],PlayerInfo[playerid][pLastMinute]);
        TextDrawSetString(gInfoPlayerCO[playerid], newtext);
        TextDrawShowForPlayer(playerid, gInfoPlayerCO[playerid]);
        if(PlayerInfo[playerid][pLastYear] == 0 && PlayerInfo[playerid][pLastMonth] == 0 && PlayerInfo[playerid][pLastDay] == 0)
        {
            format(newtext, sizeof(newtext), "Derniere connection: ~r~Aucune");
            TextDrawSetString(gInfoPlayerCO[playerid], newtext);
            TextDrawShowForPlayer(playerid, gInfoPlayerCO[playerid]);
        }
        // IP
        format(newtext, sizeof(newtext), "Derniere IP: ~g~%s", PlayerInfo[playerid][pLastIP]);
        TextDrawSetString(gInfoPlayerIP[playerid], newtext);
        TextDrawShowForPlayer(playerid, gInfoPlayerIP[playerid]);
        if(PlayerInfo[playerid][pLastIP] == 0)
        {
            format(newtext, sizeof(newtext), "Derniere IP: ~r~Aucune");
            TextDrawSetString(gInfoPlayerIP[playerid], newtext);
            TextDrawShowForPlayer(playerid, gInfoPlayerIP[playerid]);
        }
        GetPlayerIp(playerid, IP, sizeof(IP));
        format(PlayerInfo[playerid][pLastIP],16,"%s",IP);
        dini_Set(file, "LastIP",PlayerInfo[playerid][pLastIP]);
        // StartRace
        format(newtext, sizeof(newtext), "StartRace: ~g~%d", PlayerInfo[playerid][pStartRace]);
        TextDrawSetString(gInfoPlayerSR[playerid], newtext);
        TextDrawShowForPlayer(playerid, gInfoPlayerSR[playerid]);
        PlayerPlaySound(playerid,1186,0.0,0.0,0.0);

    }
    return 1;
}