/duty problem -
Youssef214 - 02.02.2014
I Get The Following Warnings:
F:\Games 1\Gta San Andreas Multiplayer\gamemodes\LSGW2.pwn(895) : warning 217: loose indentation
F:\Games 1\Gta San Andreas Multiplayer\gamemodes\LSGW2.pwn(918 ) : warning 217: loose indentation
F:\Games 1\Gta San Andreas Multiplayer\gamemodes\LSGW2.pwn(933) : warning 217: loose indentation
F:\Games 1\Gta San Andreas Multiplayer\gamemodes\LSGW2.pwn(935) : warning 217: loose indentation
In This:
Код:
if(!strcmp("/duty", cmdtext, true))
{
// if the player isnt logged into rcon , it will send the below message (change it to your desire)
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Invalid Command. Type /commands For A List Of Commands.");
new OnDuty[MAX_PLAYERS];
new admin_name[MAX_PLAYER_NAME], Message[128];
if(OnDuty[playerid] == 0)
{
GameTextForPlayer(playerid, "~w~ On Duty", 5000, 5);
SetPlayerSkin(playerid,217); // set your desired skin here
format(Message, sizeof(Message), "%s (%d) Is An Admin On Duty,Attacking Him Will Lead To Punishment!", admin_name, playerid), SendClientMessageToAll(0xFF9900AA, Message);
SetPlayerHealth(playerid,100000);
SetPlayerTeamColor(playerid);
GivePlayerWeapon(playerid,38,133337);
OnDuty[playerid] = 1;
}
else
{
GameTextForPlayer(playerid, "~r~ Off Duty", 5000, 5);
SetPlayerSkin(playerid,217); // set your desired skin here
format(Message, sizeof(Message), "%s (%d) Is An Admin Off Duty.", admin_name, playerid), SendClientMessageToAll(0xFF9900AA, Message);
SetPlayerHealth(playerid,100);
SetPlayerTeamColor(playerid);
ResetPlayerWeapons(playerid);
OnDuty[playerid] = 0;
}
return 1;
}
return 0;
}
Please I Need Help In This.
Re: /duty problem -
Konstantinos - 02.02.2014
https://sampforum.blast.hk/showthread.php?tid=256961
If you don't know how to use TAB in order to indent your code properly, use an online indenter.
AW: /duty problem -
ReD_HunTeR - 02.02.2014
Код:
if(!strcmp("/duty", cmdtext, true))
{
// if the player isnt logged into rcon , it will send the below message (change it to your desire)
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Invalid Command. Type /commands For A List Of Commands.");
new OnDuty[MAX_PLAYERS];
new admin_name[MAX_PLAYER_NAME], Message[128];
if(OnDuty[playerid] == 0)
{
GameTextForPlayer(playerid, "~w~ On Duty", 5000, 5);
SetPlayerSkin(playerid,217); // set your desired skin here
format(Message, sizeof(Message), "%s (%d) Is An Admin On Duty,Attacking Him Will Lead To Punishment!", admin_name, playerid), SendClientMessageToAll(0xFF9900AA, Message);
SetPlayerHealth(playerid,100000);
SetPlayerTeamColor(playerid);
GivePlayerWeapon(playerid,38,133337);
OnDuty[playerid] = 1;
}
else
{
GameTextForPlayer(playerid, "~r~ Off Duty", 5000, 5);
SetPlayerSkin(playerid,217); // set your desired skin here
format(Message, sizeof(Message), "%s (%d) Is An Admin Off Duty.", admin_name, playerid), SendClientMessageToAll(0xFF9900AA, Message);
SetPlayerHealth(playerid,100);
SetPlayerTeamColor(playerid);
ResetPlayerWeapons(playerid);
OnDuty[playerid] = 0;
}
return 1;
}
return 0;
}
Re: /duty problem -
Youssef214 - 02.02.2014
Код:
F:\Games 1\Gta San Andreas Multiplayer\gamemodes\LSGW2.pwn(895) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
AW: /duty problem -
ReD_HunTeR - 02.02.2014
Код:
if(!strcmp("/duty", cmdtext, true))
{
// if the player isnt logged into rcon , it will send the below message (change it to your desire)
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Invalid Command. Type /commands For A List Of Commands.");
new OnDuty[MAX_PLAYERS];
new admin_name[MAX_PLAYER_NAME], Message[128];
if(OnDuty[playerid] == 0)
{
GameTextForPlayer(playerid, "~w~ On Duty", 5000, 5);
SetPlayerSkin(playerid,217); // set your desired skin here
format(Message, sizeof(Message), "%s (%d) Is An Admin On Duty,Attacking Him Will Lead To Punishment!", admin_name, playerid), SendClientMessageToAll(0xFF9900AA, Message);
SetPlayerHealth(playerid,100000);
SetPlayerTeamColor(playerid);
GivePlayerWeapon(playerid,38,133337);
OnDuty[playerid] = 1;
}
else
{
GameTextForPlayer(playerid, "~r~ Off Duty", 5000, 5);
SetPlayerSkin(playerid,217); // set your desired skin here
format(Message, sizeof(Message), "%s (%d) Is An Admin Off Duty.", admin_name, playerid), SendClientMessageToAll(0xFF9900AA, Message);
SetPlayerHealth(playerid,100);
SetPlayerTeamColor(playerid);
ResetPlayerWeapons(playerid);
OnDuty[playerid] = 0;
}
return 1;
}
Re: /duty problem -
Youssef214 - 02.02.2014
That Didnt Worked To Me,But I Have Fixed The Problem by myself