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



ResetPlayerWeaponStats - Blackazur - 03.02.2013

Код:
stock ResetPlayerWeaponStats(playerid)
{
	ResetPlayerWeapons(playerid);

	for(new i=1;i==45;i++)
	{
	    PlayerWeapon[playerid][i] = 0;
	}
	return 1;
}
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    
    ResetPlayerWeaponStats(playerid);
Hello Guys, i have an Question how to make that only the Weapons from the Zombie Team get reseted after Death and not from Humans? So that when Humans buy an Weapon and he get infected, and he turn back into Human, that he have his Weapon which he buyed?


Re: ResetPlayerWeaponStats - Goldino - 03.02.2013

Код:
foward Weapons(playerid);
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    If(IsPlayerZombieTeam); return ResetPlayerWeaponStats(playerid);
    {
     else
     }
     If(IsPlayerHumanTeam); return LeavePlayerWeaponStats(playerid);
     SendClientMessage(playerid, -1, "Your weapons did not reset! Horay!!!");
     return 1;
}
Код:
public Weapons(playerid);
{
     If(IsPlayerInBothTeams); return SendClientMessage(playerid, -1, " ");
     LeavePlayerStats(playerid);
     {
      else
      }
      DropPlayerWeapons(playerid);
      AllowPlayerToBuyRecentWeapons(playerid);
     return 1;
}
Hope I helped


AW: ResetPlayerWeaponStats - Blackazur - 03.02.2013

undefined Symbol: IsPlayerZombieTeam


Re: ResetPlayerWeaponStats - Goldino - 03.02.2013



Код:
#define IsPlayerZombieTeam IfispInfo(Zombie);



Re: ResetPlayerWeaponStats - u3ber - 03.02.2013

@goldino: oh dear,

@op: how do you determine if the player is on either team?


AW: ResetPlayerWeaponStats - Blackazur - 03.02.2013

undefined symbol "LeavePlayerWeaponStats"

now i need just the stock for leaveplayerweaponstats, because i just have resetplayerweaponstats.


AW: ResetPlayerWeaponStats - Blackazur - 04.02.2013

Any help? I need the Stock.


Re: ResetPlayerWeaponStats - MattSlater - 04.02.2013

stock ResetPlayerWeaponStats(playerid)
{
ResetPlayerWeapons(playerid);

for(new i=1;i < 45;i++)
{
PlayerWeapon[playerid][i] = 0;
}
return 1;
}


AW: ResetPlayerWeaponStats - Blackazur - 04.02.2013

no i mean the stock for LeavePlayerWeaponStats. i get only errors:

invalid function or declaration
error 055: start of function body without function header
error 010: invalid function or declaration
error 055: start of function body without function header
error 010: invalid function or declaration
error 010: invalid function or declaration
warning 206: redundant test: constant expression is non-zero
error 036: empty statement
warning 225: unreachable code
error 029: invalid expression, assumed zero
warning 206: redundant test: constant expression is non-zero
error 036: empty statement
warning 225: unreachable code


AW: ResetPlayerWeaponStats - Blackazur - 04.02.2013

Know anyone an Answer?