25.02.2012, 13:43
Well I'm trying to get Weapon data on PlayerDeath, so he would get his weapon returned on spawn...
So player dies with:
Deagle 100 bullets
SPG 1 bullet
On Player Spawn he would get his weapons back..
I've made the code but I don't know how to put it in normally.
So player dies with:
Deagle 100 bullets
SPG 1 bullet
On Player Spawn he would get his weapons back..
I've made the code but I don't know how to put it in normally.
PHP код:
public OnPlayerSpawn(playerid)
{
GivePlayerWeapon(playerid, weapons); // undefined symbol "weapons"
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
new weapons[13][2];
for (new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
}
return 0;
}
PHP код:
C:\Users\Maki\Desktop\server 0.3d\gamemodes\TwinkisFS.pwn(163) : error 017: undefined symbol "weapons"