Plz help in god mode
#1

guys this is code for capturing the gang war

COMMAND:gwar(playerid, params[])
{
if(Player[playerid][PlayerGang] != -1)
{
if(Gang[Player[playerid][PlayerGang]][CurrentZone] == -1)
{
new bool:found = false, i, total = 0, area = Area_GetPlayerAreas(playerid, 0);
foreach(i : GangZones)
{
if(area == GangZone[i][ZoneArea])
{
found = true;
break;
}
}
if(found)
{
if(!GangZone[i][ZoneStatus])
{
if(GangZone[i][ZoneOwner] != Player[playerid][PlayerGang])
{
new tick = GetTickCount() - GangZone[i][ZoneLocked], msg[128];
if(tick > (60000 * LOCKED_MINUTES))
{
format(msg, sizeof(msg), "Capturing ~g~%s", GangZone[i][ZoneName]);
foreach(new p : Player)
{
if(Player[p][PlayerGang] == Player[playerid][PlayerGang])
{
if(Area_GetPlayerAreas(p, 0) == area)
total++;
PlayerTextDrawSetString(p, Player[p][CaptureTD][0], msg);
PlayerTextDrawSetString(p, Player[p][CaptureTD][1], "-");
PlayerTextDrawShow(p, Player[p][CaptureTD][0]);
PlayerTextDrawShow(p, Player[p][CaptureTD][1]);
Gang[Player[playerid][PlayerGang]][GangTimer] = CAPTURE_TIME;
}
}
format(msg, sizeof(msg), "{FE9A2E}** %s gang trying to capture %s zone with %d gang member!", Gang[Player[playerid][PlayerGang]][GangName], GangZone[i][ZoneName], total);
SendClientMessageToAll(-1, msg);
SendPlayerMessageToPlayer(0, playerid, "{FE9A2E}Before Gwar Make Sure you have disabled the GOTO. Use ../toggoto before gwar");
GangZone[i][ZoneStatus] = true;
GangZone[i][ZoneTimer] = SetTimerEx("AttackZone", 1000, true, "dd", Player[playerid][PlayerGang], i);
Gang[Player[playerid][PlayerGang]][CurrentZone] = i;
GangZoneFlashForAll(GangZone[i][ZoneHolder], HexToInt("FF0000AA"));
if(GangZone[i][ZoneOwner] != -1)
{
format(msg, sizeof(msg), "{FF0000}* ALERT!!! %s gang trying to capture your territory in %s", Gang[Player[playerid][PlayerGang]][GangName], GangZone[i][ZoneName]);
SendGangMessage(GangZone[i][ZoneOwner], msg);
}
}
else
{
format(msg, sizeof(msg), "{FF0000}This Zone is locked, please wait %.2f minute(s) to capture!", floatdiv(60000 * LOCKED_MINUTES - tick, 60 * 1000));
SendClientMessage(playerid, -1, msg);
}
}
else
SendClientMessage(playerid, -1, "{FF0000}Your gang already owned this zone!");
}
else
SendClientMessage(playerid, -1, "{FF0000}Someone is trying to capture this zone!");
}
else
SendClientMessage(playerid, -1, "{FF0000}You must be in gang zone to use this command!");
}
else
SendClientMessage(playerid, -1, "{FF0000}Your gang already started a war, please wait!");
}
else
SendClientMessage(playerid, -1, "{FF0000}You must be a gang member to use this command!");
return 1;
}

Guys i have god mode .. but i want that player should not use the god mode in gwar and guys god mode is in gamemode and capture cmd is in filter script
Reply
#2

My eyes hurt, put the code Between [CODE] or [PHP] tags
Reply
#3

here is a good tutorial that explains how to share variables between filterscript and gamemode;
https://sampforum.blast.hk/showthread.php?tid=261584
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)