Admin Welcome Message
#1

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.
Reply
#2

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

What errors do you get with this?

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

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.
Reply
#5

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

ok no errors anymore thanks
Reply
#7

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

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
Reply
#9

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;
}
Reply
#10

if i go to server then i dont get any message
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)