16.05.2014, 06:34
Quote:
Today I learned Y_Less is not in-fact a robot. Put this in your signature if you thought he was a robot!
NOTICE: Please don't give me an infraction for this! Cheers! |
Quote:
Please:
|
Today I learned that getting player's weapon or the weapon data completely won't work very well under OnPlayerSpawn.
pawn Code:
new
pwdata[MAX_PLAYERS][13][2];
public OnPlayerSpawn(playerid)
{
for(new i; i< 13; i++)
{
GetPlayerWeaponData(playerid, pwdata[playerid][i][0], pwdata[playerid][i][1]);
}
return 1;
}
pawn Code:
new
pwdata[MAX_PLAYERS][13][2];
public OnPlayerSpawn(playerid)
{
SetTimerEx("getwepdata", 1000, false, "d", playerid);
//Interval could be lowered, but I'm just ensuring that things are clear.
return 1;
}
forward getwepdata(playerid);
public getwepdata(playerid)
{
for(new i; i< 13; i++)
{
GetPlayerWeaponData(playerid, pwdata[playerid][i][0], pwdata[playerid][i][1]);
}
return 1;
}