22.04.2009, 23:50
Could someone fix this? I want someone to only be able to use this command if they are apart of faction 5 and at certain cords.
Код:
if(strcmp(cmd, "/yakgun", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pMember]== 5 ||PlayerInfo[playerid][pLeader] == 5 )
{
if(!PlayerToPoint(3.0, playerid, 1202.4243,-986.2501,43.4766))
{
if(OnDuty[playerid]==0)
{
format(string, sizeof(string), "* Yakuza member %s has taken weapons from Yakuza HQ", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 24, 60);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid]==1)
{
format(string, sizeof(string), "* Yakuza member %s has put weapons back in Yakuza HQ", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 24, -61);
OnDuty[playerid] = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " You are not at the Yakuza HQ!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not a member of Yakuza!");
}
}
return 1;
}

