SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 11/03/2011, 10:35 AM   #81
Riddick94
Banned
 
Join Date: Mar 2010
Location: Poland
Posts: 1,767
Reputation: 223
Default Re: Y_Ini - Let's do it!

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+

Code:
Weapon_2 = 22
Ammo_2 = 714
Load stats when player spawns.
Riddick94 is offline  
Old 11/03/2011, 10:50 AM   #82
Riddick94
Banned
 
Join Date: Mar 2010
Location: Poland
Posts: 1,767
Reputation: 223
Default Re: Y_Ini - Let's do it!

Zh3r0 what about your function? : )

edit://
Damn double -.-
Riddick94 is offline  
Old 11/03/2011, 11:10 AM   #83
Zh3r0
High-roller
 
Join Date: Mar 2008
Posts: 4,512
Reputation: 398
Default Re: Y_Ini - Let's do it!

Quote:
Originally Posted by Riddick94 View Post
Zh3r0 what about your function? : )

edit://
Damn double -.-
Do you use GivePlayerWeapon and SetPlayerAmmo ?
__________________
Zh3r0 is offline  
Old 11/03/2011, 11:12 AM   #84
Riddick94
Banned
 
Join Date: Mar 2010
Location: Poland
Posts: 1,767
Reputation: 223
Default Re: Y_Ini - Let's do it!

Em.. i'm only using this:
pawn Code:
GivePlayerWeaponEx(playerid, PlayerInfo[playerid][Weapons][w], PlayerInfo[playerid][Ammo][w]);

And i wanna give back weapons when player's logged in.
Riddick94 is offline  
Old 11/03/2011, 11:20 AM   #85
Zh3r0
High-roller
 
Join Date: Mar 2008
Posts: 4,512
Reputation: 398
Default Re: Y_Ini - Let's do it!

Quote:
Originally Posted by Riddick94 View Post
Em.. i'm only using this:
pawn Code:
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 Code:
GivePlayerWeapon(playerid, PlayerInfo[playerid][Weapons][w], PlayerInfo[playerid][Ammo][w]);
__________________
Zh3r0 is offline  
Old 11/03/2011, 11:22 AM   #86
Riddick94
Banned
 
Join Date: Mar 2010
Location: Poland
Posts: 1,767
Reputation: 223
Default Re: Y_Ini - Let's do it!

At the momment i'm using GivePlayerWeapon.

GivePlayerWeaponEx it's my Anty Weapon Cheat. GivePlayerWeapon not working correctly:

pawn Code:
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.
Riddick94 is offline  
Old 11/03/2011, 11:25 AM   #87
Zh3r0
High-roller
 
Join Date: Mar 2008
Posts: 4,512
Reputation: 398
Default Re: Y_Ini - Let's do it!

Quote:
Originally Posted by Riddick94 View Post
At the momment i'm using GivePlayerWeapon.

GivePlayerWeaponEx it's my Anty Weapon Cheat. GivePlayerWeapon not working correctly:

pawn Code:
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.
__________________
Zh3r0 is offline  
Old 11/03/2011, 11:29 AM   #88
Riddick94
Banned
 
Join Date: Mar 2010
Location: Poland
Posts: 1,767
Reputation: 223
Default Re: Y_Ini - Let's do it!

Should i make a server and you'll join to me? But only on Hamachi.

pawn Code:
, .bExtra = true, .extra = playerid);
Tell me what's that? looping or something like that?
Riddick94 is offline  
Old 11/03/2011, 11:31 AM   #89
Zh3r0
High-roller
 
Join Date: Mar 2008
Posts: 4,512
Reputation: 398
Default Re: Y_Ini - Let's do it!

Quote:
Originally Posted by Riddick94 View Post
Should i make a server and you'll join to me? But only on Hamachi.

pawn Code:
, .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.
__________________
Zh3r0 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Y_ini Stefans94 Help Archive 4 07/03/2011 07:57 PM
y_ini Help Linus- Help Archive 6 22/01/2011 01:09 PM
Y_INI [HELP] park4bmx Help Archive 14 15/01/2011 03:18 PM
Y_ini help. Haydz Help Archive 0 12/01/2011 11:35 AM


All times are GMT. The time now is 11:34 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.