Weapons dissappear after spawning them -
Devix - 20.07.2012
So, when I give a player a weapon, it pops up and deleted right after.
It worked perfectly fine before, what went wrong? What could create this bug?
Re: Weapons dissappear after spawning them -
[IKS]Niko_Hs™ - 20.07.2012
It is possible that there is a script that performs this action, post your complete callback OnPlayerUpdate.
There will certainly be a script that is in conflict
Re: Weapons dissappear after spawning them -
Cxnnor - 20.07.2012
pawn Код:
else if(!strcmp(cmdtext,"/command",true))
{
GivePlayerWeapon(playerid, //weaponid, //weaponammo);
return 1;
}
pawn Код:
CMD:command(playerid, params[])
{
GivePlayerWeapon(playerid, //weaponid, //weaponammo);
return 1;
}
Re: Weapons dissappear after spawning them -
[KHK]Khalid - 20.07.2012
Quote:
Originally Posted by Cxnnor
pawn Код:
else if(!strcmp(cmdtext,"/command",true)) { GivePlayerWeapon(playerid, //weaponid, //weaponammo); return 1; }
pawn Код:
CMD:command(playerid, params[]) { GivePlayerWeapon(playerid, //weaponid, //weaponammo); return 1; }
|
He already knows how to give a weapon. If you had read his first post, you could have understood what the issue is.
Well Devix you might check all the scripts you use for ResetPlayerWeapons inside repeatedly timers or under OnPlayerUpdate then take it out.
Edit:
Do you remember what have you done (Added/Removed/Modified) in your script right before that issue came up?
Re: Weapons dissappear after spawning them -
Devix - 22.07.2012
Well I messed around with SpawnInfo, seeing my skinID didn't save before (does now though, without the spawninfo functions). I basically got rid of all the spawninfo functions (seeing it may have prevented the weapons to spawn at login) but the issue is still there.
Re: Weapons dissappear after spawning them -
Devix - 22.07.2012
Anyone please?
This is the only bit where the function ResetPlayerweapons is called.
Код:
public LoadWeapons(playerid)
{
new i, path[50], string[128], weaponid, ammo;
path = GetPlayerFormattedName(playerid);
ResetPlayerWeapons(playerid);
for (i=0; i<13; i++)
{
format(string,sizeof(string),"Weapon - %d",i);
weaponid = dini_Int(path,string);
format(string,sizeof(string),"AmmoID - %d",i);
ammo = dini_Int(path,string);
GivePlayerWeapon(playerid,weaponid,ammo);
}
AlreadyGiveWeapons[playerid] = true;
}
But as I said, worked before.
Re: Weapons dissappear after spawning them -
Devix - 24.07.2012
Anyone? Please!!