SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 7 of 7
Search took 0.00 seconds.
Search: Posts Made By: vernz
Forum: Tutorials 09/05/2016, 06:14 PM
Replies: 51
Views: 29,416
Posted By vernz
Re: Saving weapon data (MySQL)

What should I do then ?

If I'm doing an inventory system like this, how can I compare if the playerid has a specific item in the child table ?
Forum: Tutorials 08/05/2016, 09:37 PM
Replies: 51
Views: 29,416
Posted By vernz
Re: Saving weapon data (MySQL)

Another question, if I want to know what items I have, is there a better way than that:

CMD:myitems(playerid, params[])
{
new query[128];
mysql_format(mysql, query, sizeof(query), "SELECT...
Forum: Tutorials 08/05/2016, 08:34 PM
Replies: 51
Views: 29,416
Posted By vernz
Re: Saving weapon data (MySQL)

Got it, thank you !
Forum: Tutorials 08/05/2016, 06:54 PM
Replies: 51
Views: 29,416
Posted By vernz
Re: Saving weapon data (MySQL)

Now I get it, thank you ! I was also wondering why the weaponid field is 0 ?

weaponid = cache_get_row_int(i, 0, mysql);
ammo = cache_get_row_int(i, 1, mysql);


Why not userid 0,...
Forum: Tutorials 08/05/2016, 05:50 PM
Replies: 51
Views: 29,416
Posted By vernz
Re: Saving weapon data (MySQL)

I was trying to do it, but it wasn't working for some reason, nothing was updating, I remove weaponid as unique and added the field "slot" as unique with the userid, I am not sure how to do it...
Forum: Tutorials 08/05/2016, 04:40 PM
Replies: 51
Views: 29,416
Posted By vernz
Re: Saving weapon data (MySQL)

So it would be something like:

CMD:givewep(playerid, params[])
{
new userid, weaponid, ammo, query[156];

//if(PlayerInfo[playerid][pAdmin] < 4) return SendErrorMessage(playerid,...
Forum: Tutorials 08/05/2016, 02:22 AM
Replies: 51
Views: 29,416
Posted By vernz
Re: Saving weapon data (MySQL)

What do you do if you have a weapon in the slot 7, weaponid 35 by example and then you buy a weapon who use the same slot like weaponid 36, it will create a new weapon and leave the previous one in...
Showing results 1 to 7 of 7

 

All times are GMT. The time now is 10:38 PM.


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