SA-MP Forums Archive
Can some one make /Onduty Commands for me ? - 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: Can some one make /Onduty Commands for me ? (/showthread.php?tid=333961)



Can some one make /Onduty Commands for me ? - Ptcl® - 13.04.2012

Hi guy's.....I am using ECLIPS gm and i want you to create /onduty Commands for me ...

F
unction should be :
1. Have to send client message to that admin
Код:
REDCOLOR = you are now onduty !
Set That admin health 9999
give that admin weapon = [ tec9 . sawn-off , ak47, rocket launcher ]

and MessageForAllx - REDCOLOR = Administrator %s is now on duty !

and like this offisite of this /offduty too !!!

thanks !


Re: Can some one make /Onduty Commands for me ? - IstuntmanI - 13.04.2012

You don't ask for scripts here, there is a special topic for that: https://sampforum.blast.hk/showthread.php?tid=187229

Also, it's The Eclipse.


Re: Can some one make /Onduty Commands for me ? - iOmar - 13.04.2012

==> /Onduty. You can change color by yourself. If it really worked than Please Don't forget to Rep me

pawn Код:
if(strcmp(cmd, "/onduty", true) == 0)    {
    if(PlayerInfo[playerid][Level] >= 2) {
        CMDMessageToAdmins(playerid,"Now On Duty");   GetPlayerName(playerid, adminname, sizeof(adminname));
        for(new i = 0; i <= MAX_PLAYERS; i++)
        {
        if(IsPlayerConnected(i) == 1)   {
        SetPlayerSkin(playerid,217); GivePlayerWeapon(playerid,38,500000); SetPlayerHealth(playerid,100000); SetPlayerColor(playerid,pink); format(string,256,"Administrator %s Has Now On Admin Duty",adminname);  SendClientMessage(i,pink,string);   }
        }
    } else  {
    SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");   }
    return 1;   }
===>Off Duty:
pawn Код:
if(strcmp(cmd, "/offduty", true) == 0)   
{
    if(PlayerInfo[playerid][Level] >= 2)
{
        CMDMessageToAdmins(playerid,"Now On Duty");   GetPlayerName(playerid, adminname, sizeof(adminname));
        for(new i = 0; i <= MAX_PLAYERS; i++)
        {
        if(IsPlayerConnected(i) == 1)   {

ResetPlayerWeapons(playerid);
ForceClassSelection(playerid);
SetPlayerHealth(playerid,0);
format(string,256,"Administrator %s Has End With His Admin Duty",adminname);
SendClientMessage(i,pink,string);   }
        }
    } else  {
    SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");   }
    return 1;   }



Re: Can some one make /Onduty Commands for me ? - Ptcl® - 13.04.2012

Quote:
Originally Posted by iOmar
Посмотреть сообщение
==> /Onduty. You can change color by yourself. If it really worked than Please Don't forget to Rep me

pawn Код:
if(strcmp(cmd, "/onduty", true) == 0)    {
    if(PlayerInfo[playerid][Level] >= 2) {
        CMDMessageToAdmins(playerid,"Now On Duty");   GetPlayerName(playerid, adminname, sizeof(adminname));
        for(new i = 0; i <= MAX_PLAYERS; i++)
        {
        if(IsPlayerConnected(i) == 1)   {
        SetPlayerSkin(playerid,217); GivePlayerWeapon(playerid,38,500000); SetPlayerHealth(playerid,100000); SetPlayerColor(playerid,pink); format(string,256,"Administrator %s Has Now On Admin Duty",adminname);  SendClientMessage(i,pink,string);   }
        }
    } else  {
    SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");   }
    return 1;   }
===>Off Duty:
pawn Код:
if(strcmp(cmd, "/offduty", true) == 0)   
{
    if(PlayerInfo[playerid][Level] >= 2)
{
        CMDMessageToAdmins(playerid,"Now On Duty");   GetPlayerName(playerid, adminname, sizeof(adminname));
        for(new i = 0; i <= MAX_PLAYERS; i++)
        {
        if(IsPlayerConnected(i) == 1)   {

ResetPlayerWeapons(playerid);
ForceClassSelection(playerid);
SetPlayerHealth(playerid,0);
format(string,256,"Administrator %s Has End With His Admin Duty",adminname);
SendClientMessage(i,pink,string);   }
        }
    } else  {
    SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");   }
    return 1;  
}
Not working.....Symbole is never used "Onduty" using as filterscript !


Re: Can some one make /Onduty Commands for me ? - sampmark05 - 13.04.2012

Код:
CMD:onduty(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "This is an admin only command!");
	if(PlayerInfo[playerid][pAdminDuty] == 0)
	{

		SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
		//SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
		PlayerInfo[playerid][pAdminDuty] = 1;
		SetPlayerHealth(playerid, 100000);
		SetPlayerArmour(playerid, 100000);
		//SetPlayerSkin(playerid, 294); - Commented by Voltage
		new string[128];
		format(string, sizeof(string), "Administrator %s is now on Admin Duty! (/report for assistance)", GetPlayerNameEx(playerid));
		SendClientMessageToAllEx(COLOR_YELLOW, string);
	}
	else
	{
			SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
			//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
			SetPlayerHealth(playerid, 100);
			SetPlayerArmour(playerid, 0);
			//SetPlayerSkin(playerid, 299); - Commented by Voltage
			PlayerInfo[playerid][pAdminDuty] = 0;
	}
    return 1;
}



Re: Can some one make /Onduty Commands for me ? - Ptcl® - 13.04.2012

Quote:
Originally Posted by sampmark05
Посмотреть сообщение
Код:
CMD:onduty(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "This is an admin only command!");
	if(PlayerInfo[playerid][pAdminDuty] == 0)
	{

		SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
		//SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
		PlayerInfo[playerid][pAdminDuty] = 1;
		SetPlayerHealth(playerid, 100000);
		SetPlayerArmour(playerid, 100000);
		//SetPlayerSkin(playerid, 294); - Commented by Voltage
		new string[128];
		format(string, sizeof(string), "Administrator %s is now on Admin Duty! (/report for assistance)", GetPlayerNameEx(playerid));
		SendClientMessageToAllEx(COLOR_YELLOW, string);
	}
	else
	{
			SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
			//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
			SetPlayerHealth(playerid, 100);
			SetPlayerArmour(playerid, 0);
			//SetPlayerSkin(playerid, 299); - Commented by Voltage
			PlayerInfo[playerid][pAdminDuty] = 0;
	}
    return 1;
}
Код:
(4550) : error 017: undefined symbol "PlayerInfo"
D:\Universal stunting 0.3c\gamemodes\GHV.pwn(4550) : warning 215: expression has no effect
D:\Universal stunting 0.3c\gamemodes\GHV.pwn(4550) : error 001: expected token: ";", but found "]"
D:\Universal stunting 0.3c\gamemodes\GHV.pwn(4550) : error 029: invalid expression, assumed zero
D:\Universal stunting 0.3c\gamemodes\GHV.pwn(4550) : fatal error 107: too many error messages on one line
And what about this ....i got this error !


Re: Can some one make /Onduty Commands for me ? - iOmar - 13.04.2012

At Line "4550" put ; at last of statement!