17.01.2014, 08:54
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 ...
and here is the command :
Код:
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); } } }
Код:
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; }