Posts: 1,767
Threads: 124
Joined: Mar 2010
I was try to Load weapons when player Logging in - not working. But when OnPlayerSpawn.. it's spamming weapon sniper rifle with ammo 0 (don't know why because i wasn't bought sniper).
edit://
Wait omg! my fail! i must do something and tell what happend after that.
edit2://
WTF? it spawned COLT45 (okey i was bought that) but with ammo 34 not over 700.. : o+
Код:
Weapon_2 = 22
Ammo_2 = 714
Load stats when player spawns.
Posts: 1,767
Threads: 124
Joined: Mar 2010
Zh3r0 what about your function? : )
edit://
Damn double -.-
Posts: 1,767
Threads: 124
Joined: Mar 2010
Em.. i'm only using this:
pawn Код:
GivePlayerWeaponEx(playerid, PlayerInfo[playerid][Weapons][w], PlayerInfo[playerid][Ammo][w]);
And i wanna give back weapons when player's logged in.
Posts: 1,767
Threads: 124
Joined: Mar 2010
At the momment i'm using GivePlayerWeapon.
GivePlayerWeaponEx it's my Anty Weapon Cheat. GivePlayerWeapon not working correctly:
pawn Код:
foreach2(w, MAX_WEAPON_SLOTS)
{
new string[32];
format(string, sizeof(string), "Weapon_%d", w);
if(!strcmp(string, name, true))PlayerInfo[playerid][Weapons][w] = strval(value);
format(string, sizeof(string), "Ammo_%d", w);
if(!strcmp(string, name, true))PlayerInfo[playerid][Ammo][w] = strval(value);
GivePlayerWeapon(playerid, PlayerInfo[playerid][Weapons][w], PlayerInfo[playerid][Ammo][w]);
}
And i won't to give weapons after spawn but when player is Logged.
Posts: 1,767
Threads: 124
Joined: Mar 2010
Should i make a server and you'll join to me? But only on Hamachi.
pawn Код:
, .bExtra = true, .extra = playerid);
Tell me what's that? looping or something like that?