SA-MP Forums Archive
Admin Welcome Message - 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: Admin Welcome Message (/showthread.php?tid=115392)



Admin Welcome Message - rs2fun111 - 23.12.2009

i have a question how i can set Admin Welcome Messages With Ladmin

Код:
public AdminWelcomeTexts()
{
if (IsPlayerAdminLevel(playerid, 5))
SendClientMessageToAll (COLOR_DARKGREEN,"Owner Kalvi Has Joined To Server");
return 1;
}
Error Code:

what is wrong with this cod?
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\IsPlayerLAdmin.inc(34) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\kfs.pwn(779) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Admin Welcome Message - Fj0rtizFredde - 23.12.2009

pawn Код:
SendClientMessageToAll (COLOR_DARKGREEN,"Owner Kalvi Has Joined To Server");
(BTW is your IsPlayerAdminLevel right?)



Re: Admin Welcome Message - Niixie - 23.12.2009

What errors do you get with this?

pawn Код:
if (IsPlayerAdminLevel(playerid, 5))
}
     SendClientMessageToAll(COLOR_DARKGREEN, "Owner Kalvi Has Joined To Server");
     return 1;
}



Re: Admin Welcome Message - rs2fun111 - 23.12.2009

C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\IsPlayerLAdmin.inc(34) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\kfs.pwn(779) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Admin Welcome Message - Fj0rtizFredde - 23.12.2009

change your
pawn Код:
forward AdminWelcomeTexts()
to :
pawn Код:
forward AdminWelcomeTexts(playerid);
And then change
pawn Код:
public AdminWelcomeTexts()
to:
pawn Код:
public AdminWelcomeTexts(playerid)



Re: Admin Welcome Message - rs2fun111 - 23.12.2009

ok no errors anymore thanks



Re: Admin Welcome Message - rs2fun111 - 23.12.2009

btw how i can get %s to Name? like "%s has joined to server"


Re: Admin Welcome Message - DeltaAirlines12 - 23.12.2009

Quote:
Originally Posted by rs2fun111
btw how i can get %s to Name? like "%s has joined to server"
https://sampwiki.blast.hk/wiki/Creating_...Leave_Messages


Re: Admin Welcome Message - [NYRP]Mike. - 23.12.2009

here try this:

pawn Код:
forward AdminWelcomeText(playerid);
public AdminWelcomeText(playerid)
{
    if(IsPlayerAdminLevel(playerid) == 5)
    {
      SendClientMessageToAll (COLOR_DARKGREEN,"Owner Kalvi Has Joined To Server");
      return 1;
    }
    return 1;
}



Re: Admin Welcome Message - rs2fun111 - 23.12.2009

if i go to server then i dont get any message