Bugsss -
LeeXian99 - 25.03.2013
Hello guys, I just scripted out this... But I don't know how to fix it. :/ I want like
"VIP %s has spawned."
"Server Owner %s has spawned."
How? Here's my script.
pawn Код:
if(IsPlayerVipMember(playerid))
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format (string,sizeof(string),"[SPAWNMSG]: VIP %s has spawned.", name);
SendClientMessageToAll(0x5A369600,string);
}
else
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format (string,sizeof(string),"[SPAWNMSG]: Player %s has spawned.", name);
SendClientMessageToAll(0x5A369600,string);
}
if(IsPlayerLuxAdminLevel(playerid, 1))
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format (string,sizeof(string),"[SPAWNMSG]: Helper %s has spawned.", name);
SendClientMessageToAll(0x5A369600,string);
}
if(IsPlayerLuxAdminLevel(playerid, 2))
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format (string,sizeof(string),"[SPAWNMSG]: Moderator %s has spawned.", name);
SendClientMessageToAll(0x5A369600,string);
}
if(IsPlayerLuxAdminLevel(playerid, 3))
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format (string,sizeof(string),"[SPAWNMSG]: Administrator %s has spawned.", name);
SendClientMessageToAll(0x5A369600,string);
}
if(IsPlayerLuxAdminLevel(playerid, 4))
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format (string,sizeof(string),"[SPAWNMSG]: Lead Administrator %s has spawned.", name);
SendClientMessageToAll(0x5A369600,string);
}
if(IsPlayerLuxAdminLevel(playerid, 5))
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format (string,sizeof(string),"[SPAWNMSG]: Server Owner %s has spawned.", name);
SendClientMessageToAll(0x5A369600,string);
}
Re: Bugsss -
dusk - 25.03.2013
Wait, you want this or you do NOT want it?
Seeing that it exists... Just delete it all and it will dissapear.
Or i just don't understand you?
Re: Bugsss -
Faisal_khan - 25.03.2013
Are you sure this is under OnPlayerSpawn callback?
Re: Bugsss -
LeeXian99 - 25.03.2013
Fine, I created another one on LuxAdmin.pwn... Problem tho.
pawn Код:
if(AccInfo[playerid][level])
{
switch(AccInfo[playerid][level])
{
case 1: AdmRank = "Helper";
case 2: AdmRank = "Moderator";
case 3: AdmRank = "Administrator";
case 4: AdmRank = "Lead Administrator";
case 5: AdmRank = "Server Owner";
}
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"[SPAWNMSG] %s %s has spawned.", name, AdmRank);
SendClientMessage(playerid,0x00C378AA,string);
}
Errors:
Код:
C:\Users\Kelvin\Desktop\Scripting\filterscripts\LuxAdmin.pwn(987) : error 017: undefined symbol "level"
C:\Users\Kelvin\Desktop\Scripting\filterscripts\LuxAdmin.pwn(989) : error 017: undefined symbol "level"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: Bugsss -
dusk - 25.03.2013
Easy, there is no part called level in your enum
Re: Bugsss -
LeeXian99 - 25.03.2013
It's on LuxAdmin.pwn!!
Re: Bugsss -
Faisal_khan - 25.03.2013
Pawno is case sensitive. Are you sure it is 'level' instead of 'Level'.
Re: Bugsss -
JaKe Elite - 25.03.2013
your level is in lower case. Make it in upper case.
I just checked in LuxAdmin and it has upper case
Re: Bugsss -
LeeXian99 - 25.03.2013
Thanks, Romel, but it only works for Server Owner, I don't know how to make it for all levels...
pawn Код:
if(AccInfo[playerid][Level])
{
switch(AccInfo[playerid][Level])
{
case 1: AdmRank = "Helper";
case 2: AdmRank = "Moderator";
case 3: AdmRank = "Administrator";
case 4: AdmRank = "Lead Administrator";
case 5: AdmRank = "Server Owner";
}
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"[SPAWNMSG] %s %s has spawned.", AdmRank,name);
SendClientMessage(playerid,0x00C378AA,string);
}
Comment on the added side so I can learn that easily. :P
Re: Bugsss -
LeeXian99 - 25.03.2013
I just figured I put SendClientMessage. :X