A little help - 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: A little help (
/showthread.php?tid=480839)
A little help -
Excelize - 13.12.2013
Hey guys
I want to make a little thing for a specific player when they log in
I want it to be like
Код:
PlayerName has logged in.
Or
Код:
Server owner PlayerName has logged in.
How would this be possible?
Re: A little help -
Ada32 - 13.12.2013
when the player logs in, send a message..
Re: A little help -
Excelize - 13.12.2013
I know that, and i have it, but if i wanted a Specific player to be announced a different style of announcement, what would i do?
I mean
A normal player's would be like this: *%s has logged in!
A specific player's would be like this: Server owner Test has logged in!
Re: A little help -
Ada32 - 13.12.2013
check if he's the server owner, format the message to say what you want and send it
show some code also
Re: A little help -
Excelize - 13.12.2013
Thanks, but I've solved now.
Re: A little help -
Deduction - 13.12.2013
Edit: NVM You already solved it xD
Where the player logs in, just put this code:
pawn Код:
new string[128], name;
if(!IsAdmin){ //Check if Player is not Admin, could be set to !PlayerInfo[playerid][pAdmin] > 0
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has logged in.", GetPlayerName(playerid));
SendClientMessageToAll(COLOR_YELLOW, string); }
else {
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[Admin] %s has logged in.", GetPlayerName(playerid));
SendClientMessageToAll(COLOR_YELLOW, string);}
Just adjust the color to what you want!