Capture - 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: Capture (
/showthread.php?tid=488239)
Capture -
Ph0eniX - 17.01.2014
Hi all , i have a problem with capture system ( at gang ) when 1 player captured 1 gang...how i can make to can't capture again hes gang ? For example me i capture 1 gang and if no one from another gang capture...this gang captured by me , my gang to can't capture...this gang . pff i don't know if any1 understand me ... here at Progres Turfing ...
Код:
public ProgresTurfing(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 3, 1518.5302,721.4332,10.8203))
{
GangZoneStopFlashForAll(Thug);
GangZoneShowForAll(Thug,GangColors[GetGangColor(GetPlayerGang(playerid))]);
DisablePlayerCheckpoint(playerid);
if(IsPlayerGangMember(playerid, "Thug Life"))
{
SetGVarInt("Captured" , 1 , 1);
}
else if(IsPlayerGangMember(playerid, "Staff"))
{
SetGVarInt("Captured" , 1 , 2);
}
}
}
and here is the command :
Код:
CMD:capture(playerid, params[])
{
if(IsPlayerAnyGangMember(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 3, 1518.5302,721.4332,10.8203))
{
if(IsPlayerGangMember(playerid, "Thug Life") && GetGVarInt( "Captured", 1) == 1)
{
SendClientMessage(playerid, -1 , "ERROR:This gang is allready your's");
}
if(IsPlayerGangMember(playerid, "Staff") && GetGVarInt( "Captured", 1) == 2)
{
SendClientMessage(playerid, -1 , "ERROR:This gang is allready your's");
}
else
{
GangZoneFlashForAll(Thug,GangColors[ GetGangColor( GetPlayerGang( playerid ) ) ]);
SetTimerEx( "ProgresTurfing", 10000, 0, "i", playerid );
SetPlayerCheckpoint(playerid, 1518.5302,721.4332,10.8203, 3.0);
}
}
else return SendClientMessage(playerid,red,"You are not near capture zone!");
}
else return SendClientMessage(playerid,red,"You can't capture this gang becouse you are not in a gang!");
return 1;
}
Re: Capture -
Ph0eniX - 17.01.2014
Up...
Re: Capture -
Raza2013 - 17.01.2014
what you mean try to explain clearly?
Re: Capture -
Ph0eniX - 17.01.2014
i want when my gang capture another gang ... to can't capture again if another gang don't capture this gang what i captured