Re: Y_Ini - Let's do it! -
Riddick94 - 11.03.2011
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.
Re: Y_Ini - Let's do it! -
Riddick94 - 11.03.2011
Zh3r0 what about your function? : )
edit://
Damn double -.-
Re: Y_Ini - Let's do it! -
Zh3r0 - 11.03.2011
Quote:
Originally Posted by Riddick94
Zh3r0 what about your function? : )
edit://
Damn double -.-
|
Do you use GivePlayerWeapon and SetPlayerAmmo ?
Re: Y_Ini - Let's do it! -
Riddick94 - 11.03.2011
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.
Re: Y_Ini - Let's do it! -
Zh3r0 - 11.03.2011
Quote:
Originally Posted by Riddick94
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.
|
It's that a custom function by you?
Use
pawn Код:
GivePlayerWeapon(playerid, PlayerInfo[playerid][Weapons][w], PlayerInfo[playerid][Ammo][w]);
Re: Y_Ini - Let's do it! -
Riddick94 - 11.03.2011
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.
Re: Y_Ini - Let's do it! -
Zh3r0 - 11.03.2011
Quote:
Originally Posted by Riddick94
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.
|
Please download
www.teamviewer.com and give me the IP and PASS trough PM so i can enter in your computer, because everything here is getting confusing.
Re: Y_Ini - Let's do it! -
Riddick94 - 11.03.2011
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?
Re: Y_Ini - Let's do it! -
Zh3r0 - 11.03.2011
Quote:
Originally Posted by Riddick94
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?
|
That passes the playerid to the function.
I can't test anything from a server, i must see the code live.