Whats wrong with it? - 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: Whats wrong with it? (
/showthread.php?tid=270628)
Whats wrong with it? -
Harry_Sandhu - 21.07.2011
http://pastebin.com/Q2155crH
See it and tell me whats wrong with it?
When i type /admins then it says that UNkown command message. and when i logged in Rcon then it shows 15 - 20 times
Server Owner: %s
Re: Whats wrong with it? -
Harry_Sandhu - 21.07.2011
*BUMP*
Re: Whats wrong with it? -
PotH3Ad - 21.07.2011
Give this a try:
pawn Код:
if(!strcmp(cmdtext, "/admins", true))
{
new str[100];
SendClientMessage(playerid, 0xFFFFFFFF, "Admins: ");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(IsPlayerAdmin(i) || PlayerInfo[i][pAdmin] >= 1)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(i, pname, sizeof(pname));
format(str, sizeof(str), "Name: %s | Rank: %s", pname, GetAdminRank(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, str);
}
}
return 1;
}
//Add this somewhere in your script
GetAdminRank(playerid)
{
new rank[25];
switch(PlayerInfo[playerid][pAdmin])
{
case 1: rank = "Level 1"; //Change to your liking
case 2: rank = "Level 2";
case 3: rank = "Level 3";
case 4: rank = "Level 4";
case 5: rank = "Level 5";
default: if(IsPlayerAdmin(i)) rank = "Server Owner";
}
return rank;
}
Untested.
Re: Whats wrong with it? -
iRana - 21.07.2011
return 1; at end of your command.
Re: Whats wrong with it? -
JonnyDeadly - 21.07.2011
To be honest with you, this is why i use zcmd.. a whole lot simpler.
Re: Whats wrong with it? -
Harry_Sandhu - 21.07.2011
http://pastebin.com/L2kkKjRC
I have not use it and its great but i have done some changes.
Can you help me with /aduty
I want to script that if a person use /aduty then it says that USAGE: /aduty [on/off] & if(offduty then SCM(pid, color,"you are already off duty & same with the on duty.) and it should also set the Player color which i have given in the Duty on
2. When there are no admins online then is there any way that it shows that there are not availible admins online.
Re: Whats wrong with it? -
Harry_Sandhu - 21.07.2011
*BUMP* I need help Fast.
Re: Whats wrong with it? -
Harry_Sandhu - 21.07.2011
*BUMP* i need help please helpm e.
AW: Whats wrong with it? -
samtey - 21.07.2011
Stop that goddamn bumping! You won't get a higher rank in this forum with those things!!
And
why the hell you don't use the best thing of the internet?
******!
Re: Whats wrong with it? -
Harry_Sandhu - 21.07.2011
I just need help