Commands Disabled.
#1

Hello.

I think I am supposed to post this in a GodFather Script forum, but however I don't know if its to do with the script or not.
I am not the Advanced Scripter but I have had some troubles lately, I added in a Pizza Boy job and just copied how Mechanics were set out.
When I tried to compile the script, I had gotten 7 Warnings, All were Loose Indentation.
When I run the gamemode all commands above /duty work.
But commands under /duty donot work, not even /duty itself.

Here is the /duty script.

if(strcmp(cmd, "/duty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pMember] == 1)
{
if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
{
if(OnDuty[playerid]==0)
{
format(string, sizeof(string), "* Officer %s took a Badge and a Gun from his locker.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
GivePlayerWeapon(playerid, 24, 70);
GivePlayerWeapon(playerid, 3, 0);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid]==1)
{
format(string, sizeof(string), "* Officer %s places his Badge and Gun in his locker.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
GivePlayerWeapon(playerid, 23, 150);
GivePlayerWeapon(playerid, 5, 0);
OnDuty[playerid] = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " You are not in a locker room !");
return 1;
}
}
else if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
{
if(JobDuty[playerid] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Medic Job and will not receive calls anymore.");
JobDuty[playerid] = 0;
Medics -= 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Medic Job and will receive calls from people in need.");
JobDuty[playerid] = 1;
Medics += 1;
}
}
else if(PlayerInfo[playerid][pJob] == 7)
{
if(JobDuty[playerid] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Car Mechanic Job and will not receive calls anymore.");
JobDuty[playerid] = 0;
Mechanics -= 1;
}
}
else if(JobDuty[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Car Mechanic Job and will receive calls from people in need.");
JobDuty[playerid] = 1;
Mechanics += 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " You are not in a locker room !");
return 1;
}
If you know what might help solve this then I would be very grateful.
Thankyou,
Jbosh123
Reply
#2

Erm this may and may not work,
At the bottom of that duty command is return 1;
And then further up theres another, Try removing it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)