After i die i get weapons. -
Glossy42O - 15.01.2015
Like the title says.
PHP код:
if(GetPlayerTeam(playerid) == TEAM_GROVE)
{
GivePlayerWeapon(playerid, 24,90);
GivePlayerWeapon(playerid, 25,100);
GivePlayerWeapon(playerid, 31,200);
return 1;
}
if(GetPlayerTeam(playerid) == TEAM_BALLAS)
{
GivePlayerWeapon(playerid, 24,100);
GivePlayerWeapon(playerid, 27,50);
GivePlayerWeapon(playerid, 29,200);
return 1;
}
if(GetPlayerTeam(playerid) == TEAM_VAGOS)
{
GivePlayerWeapon(playerid, 24,90);
GivePlayerWeapon(playerid, 25,100);
GivePlayerWeapon(playerid, 31,200);
return 1;
}
if(GetPlayerTeam(playerid) == TEAM_HOBOS)
{
GivePlayerWeapon(playerid, 24,70);
GivePlayerWeapon(playerid, 27,100);
GivePlayerWeapon(playerid, 34,200);
GivePlayerWeapon(playerid, 34,50);
return 1;
}
if(GetPlayerTeam(playerid) == TEAM_COPS)
{
GivePlayerWeapon(playerid, 24,90);
GivePlayerWeapon(playerid, 25,100);
GivePlayerWeapon(playerid, 31,200);
return 1;
}
if(GetPlayerTeam(playerid) == TEAM_CHINESE)
{
GivePlayerWeapon(playerid, 24,90);
GivePlayerWeapon(playerid, 27,100);
GivePlayerWeapon(playerid, 31,200);
GivePlayerWeapon(playerid, 32,200);
return 1;
}
Re: After i die i get weapons. -
nezo2001 - 15.01.2015
If you want when you die remove your weapons type under onplayerdeath
PHP код:
ResetPlayerWeapons(playerid);
Re: After i die i get weapons. -
Glossy42O - 15.01.2015
no no, When i connect i spawn i got no weapons but if i die and spawn again i got weapons.
Re: After i die i get weapons. -
Markus1337 - 15.01.2015
And you have this code under OnPlayerSpawn?
if so, when do you assign them to teams?
Re: After i die i get weapons. -
Franklyns - 15.01.2015
Why you dont make Commands like /weap or else?
Re: After i die i get weapons. -
Glossy42O - 15.01.2015
Nah, it's lsgw plus, there is always noobs that spawn kill.
Anyways, yes it's under on player spawn
Re: After i die i get weapons. -
Markus1337 - 15.01.2015
Quote:
Originally Posted by Franklyns
Why you dont make Commands like /weap or else?
|
Why would he? It's much more comfortable for players to spawn with weapons rather than having them select new guns over and over again everytime they connect to the server.
Quote:
Originally Posted by Stuun23
Nah, it's lsgw plus, there is always noobs that spawn kill.
Anyways, yes it's under on player spawn
|
Strange, there shouldn't be any issues then, It's hard to tell by just looking at the code snippet you have posted.
Re: After i die i get weapons. -
CalvinC - 15.01.2015
You gotta check the team under OnPlayerSpawn, as well as OnPlayerDeath if you want to give weapons in both occassions.
You should use a switch instead though, much more efficient than alot of "if"-statements.
Re: After i die i get weapons. -
Glossy42O - 15.01.2015
what do you mean?
Re: After i die i get weapons. -
CalvinC - 15.01.2015
If you want to give players weapons when spawning.
You haven't described your issue, so it's quite hard to help you.