SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 08/01/2012, 11:44 PM   #1
Snowman12
Huge Clucker
 
Join Date: Jan 2011
Location: Nottingham, UK.
Posts: 445
Reputation: 23
Default Loading players weapons

Hey,

I am trying to load a players weapons however I cannot figure out how could someone show me the way it's done? I use MySQL for my file saving.

Thanks,

-Snowman
Snowman12 is offline   Reply With Quote
Old 09/01/2012, 12:21 AM   #2
Tanush123
High-roller
 
Tanush123's Avatar
 
Join Date: Aug 2011
Posts: 1,022
Reputation: 65
Default Re: Loading players weapons

Do you exactly make weapons save on disconnect? if so under your onplayerdisconnect add
pawn Code:
format(query,sizeof(query),"UPDATE acc SET Weapon1 = %d",GetPlayerWeapon(playerid));
mysql_query(playerid);
you must have some strval field on player log so something like
pawn Code:
PlayerData[playerid][Weapon1] = strval(field[0]);
and onplayerspawn
pawn Code:
GivePlayerWeapon(playerid,PlayerData[playerid][Weapon1],5000);
hope you get me xD
Tanush123 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
MySQL Loading Weapons, Not working.... Dokins Scripting Help 2 01/10/2011 08:50 PM
Crashing after loading weapons. borba Help Archive 8 27/04/2011 08:45 AM
Making weapons loading short ||123|| Help Archive 5 04/09/2010 07:03 PM
-1 Ammo bug when loading players weapons. Johndaone Help Archive 2 15/06/2010 05:35 AM


All times are GMT. The time now is 08:53 PM.


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