SA-MP Forums Archive
GetPlayerState Problem - 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: GetPlayerState Problem (/showthread.php?tid=584925)



GetPlayerState Problem - SpikY_ - 09.08.2015

Hi, I want to Remove the reward for the player who did not spawn and remove the reward for those also who spawned 10 seconds before the mission ended. here are the codes.

Код:
forward NoExplode(playerid);
public NoExplode(playerid)
{
    if(GetPlayerState(playerid) == 7) return SendClientMessage(playerid, -1, "No reward for you, so fuck off?");
    
	for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
	{
       	if(gTeam[i] == TEAM_ATTACKERS)
       	{
        	MissionPassed(playerid);
        	GivePlayerMoney(i, 4000);
   	     	SetPlayerScore(i,GetPlayerScore(i)+3);
   	     	AccInfo[playerid][MissionPass]++;
   	     	SetPVarInt(playerid, "MissionPass", AccInfo[playerid][MissionPass]);
			SendClientMessage(i,-1,"{7C7C7C}» You've Recieved 3 Points and $4,000 for Completing the mission Objective.");
			PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0);
     	}
     	if(gTeam[i] == TEAM_DEFENDERS)
      	{
      		MissionFailed(playerid);
      		PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0);
			GivePlayerMoney(i, -2000);
			SendClientMessage(i,-1,"{FF0000}» You've Lost -$2000 Money for Not completing the Mission Objective.");
    	}
    	SetTimerEx("NewMode",14000,false,"i", playerid);
	}
	return 1;
}



Re: GetPlayerState Problem - MarvinPWN - 09.08.2015

delete


Re: GetPlayerState Problem - SpikY_ - 09.08.2015

Anyone please?


Re: GetPlayerState Problem - SpikY_ - 09.08.2015

BUMP?