SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 10/09/2012, 07:49 AM   #1
[BR]Michael
Big Clucker
 
Join Date: Apr 2008
Posts: 148
Reputation: 16
Default System save/load weapons

Hello, I'm having some problems on my system to save and load my weapon system, it took a change and still not working properly, could help me? Sorry my bad english, and now thanks.

pawn Code:
stock ResetWeapons(playerid)
{
    ResetPlayerWeapons(playerid);
}

stock RemoveWeapons(playerid)
{
    for(new i = 0; i < 13; i++)
    {
        GetWeapons[playerid][i][0] = 0;
        GetWeapons[playerid][i][1] = 0;
    }
    ResetPlayerWeapons(playerid);
}

stock LoadWeapons(playerid)
{
    KillTimer(TimerReceive[playerid][0]);
    ReceivingWeapon[playerid] = 1;
    ResetWeapons(playerid);
    for(new i = 0; i < 13; i++)
    {
        if(GetWeapons[playerid][i][0] != 0 && GetWeapons[playerid][i][1] != 0)
            GivePlayerWeapon(playerid, GetWeapons[playerid][i][0], GetWeapons[playerid][i][1]);
    }
    SaveWeapons(playerid);
    TimerReceive[playerid][0] = SetTimerEx("ZerarRecebendoArma", 10000, 0, "d", playerid);
}

stock SaveWeapons(playerid)
{
    for(new i = 0; i < 13; i++)
    {
        new w = 0, a = 0;
        GetPlayerWeaponData(playerid, i, w, a);
        if(a <= 0)
        {
            GetWeapons[playerid][i][0] = 0;
            GetWeapons[playerid][i][1] = 0;
        }
        else if(a < 0xFFFF || i < 2)
        {
            GetWeapons[playerid][i][0] = w;
            GetWeapons[playerid][i][1] = a;
        }
    }
}
[BR]Michael is offline   Reply With Quote
Old 10/09/2012, 07:36 PM   #2
[BR]Michael
Big Clucker
 
Join Date: Apr 2008
Posts: 148
Reputation: 16
Default Re: System save/load weapons

Up :/
[BR]Michael is offline   Reply With Quote
Old 10/09/2012, 07:39 PM   #3
CROSS_Hunter
Huge Clucker
 
CROSS_Hunter's Avatar
 
Join Date: Jul 2012
Location: On Earth
Posts: 319
Reputation: 17
Default Re: System save/load weapons

whats the problem?

1. dont bump your posts
2. did you call those stock functions in any call back?
3. wheres your saving system?
4. dont use stocks.. use enumerators to save / load the weapons and a saving system as well
CROSS_Hunter is offline   Reply With Quote
Old 10/09/2012, 08:32 PM   #4
[BR]Michael
Big Clucker
 
Join Date: Apr 2008
Posts: 148
Reputation: 16
Default Re: System save/load weapons

Quote:
Originally Posted by CROSS_Hunter View Post
whats the problem?

1. dont bump your posts
2. did you call those stock functions in any call back?
3. wheres your saving system?
4. dont use stocks.. use enumerators to save / load the weapons and a saving system as well
Hello, I'm managing to save the weapons, but they are not loading ...
[BR]Michael is offline   Reply With Quote
Old 10/09/2012, 08:39 PM   #5
zT KiNgKoNg
Gangsta
 
Join Date: Jun 2012
Location: $Location = $this->Location->Finder('United Kingdom');
Posts: 991
Reputation: 40
Default Re: System save/load weapons

Quote:
Originally Posted by CROSS_Hunter View Post
whats the problem?

1. dont bump your posts
2. did you call those stock functions in any call back?
3. wheres your saving system?
4. dont use stocks.. use enumerators to save / load the weapons and a saving system as well

So fucking true
zT KiNgKoNg is offline   Reply With Quote
Old 14/09/2012, 01:22 AM   #6
[BR]Michael
Big Clucker
 
Join Date: Apr 2008
Posts: 148
Reputation: 16
Default Re: System save/load weapons

up ;x
[BR]Michael is offline   Reply With Quote
Reply

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
Weapons load save nton Scripting Help 3 30/07/2012 09:51 AM
How to save load weapons?? stuoyto Scripting Help 0 05/06/2012 12:17 AM
How to Save/Load Weapons && How can I give cars their own ID? Ihsan-Cingisiz Help Archive 2 22/01/2011 07:38 PM
Save Weapons system not working.. dougbrowne Help Archive 7 30/08/2009 11:01 PM
Help with Save&Load of a Car System.... Castle Help Archive 3 10/08/2009 12:42 AM


All times are GMT. The time now is 03:18 PM.


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