Y_Ini - Let's do it!
#61

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

Zh3r0 what about your function? : )

edit://
Damn double -.-
Reply
#63

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
Zh3r0 what about your function? : )

edit://
Damn double -.-
Do you use GivePlayerWeapon and SetPlayerAmmo ?
Reply
#64

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

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]);
Reply
#66

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

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)