SA-MP Forums Archive
help me with welcome text please :) - 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: help me with welcome text please :) (/showthread.php?tid=427610)



Solved! - memeli11 - 02.04.2013

Solved!


Re: help me with welcome text please :) - faff - 02.04.2013

Add this in the top of your gamemode.
pawn Код:
#define COLOR_YELLOW 0xFFFF00FF

add this to ''OnPlayerSpawn''

pawn Код:
string[128];
    format(string, sizeof string,"[SERVER] Welcome to SERVERNAME, Logged in as %s. (job:%s)", RPN(playerid), Job(playerid));
    SendClientMessage(playerid, COLOR_YELLOW, string);
Add this somewhere in your gamemode.
pawn Код:
stock RPN(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if(name[i] == '_') name[i] = ' ';
    }
    return name;
}
Jobname..

This is different for each gamemode.

Try this.

Add this somewhere in your gamemode.

pawn Код:
stock Job(playerid)
{
getpvarint(playerid,"job") //it will be the job id
}



Re: help me with welcome text please :) - memeli11 - 02.04.2013

Thanks , + rep