SA-MP Forums Archive
CONNECT - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: CONNECT (/showthread.php?tid=205358)



CONNECT - NuggaN_ - 01.01.2011

Is there any possibility to add a Timer to OnPlayerConnect, I want to add like some ClientMessages (Welcome, wait till loading your stats etc..") How can I do this by OnPlayerConnect? And how to add a Textdraw above a skin by Classselection ?

Cheers x


Re: CONNECT - [L3th4l] - 01.01.2011

pawn Код:
OnPlayerConnect(playerid)
{
    SetTimerEx("LoadStats", 5000, false, "i", playerid); // A 5 second timer..
    SendClientMessage(playerid, COLOR, "Welcome, wait till loading your stats etc..");
    return 1;
}

forward LoadStats(iPlayer); // 'iPlayer' refers to the player on which we called the timer
public LoadStats(iPlayer)
{
    LoadPlayerInfo(iPlayer); // However you load your stats, mine load from a stock, hence the single line
    SendClientMessage(iPlayer, COLOR, "Your stats have been loaded!");
    return 1;
}
And for the textdraw, use the editor and position it to your likings..