Weapons dissappear after spawning them
#1

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?
Reply
#2

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
Reply
#3

pawn Код:
else if(!strcmp(cmdtext,"/command",true))
    {
        GivePlayerWeapon(playerid, //weaponid, //weaponammo);
        return 1;
    }
pawn Код:
CMD:command(playerid, params[])
    {
        GivePlayerWeapon(playerid, //weaponid, //weaponammo);
        return 1;
    }
Reply
#4

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?
Reply
#5

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.
Reply
#6

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.
Reply
#7

Anyone? Please!!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)