SA-MP Forums Archive
Bugged toy system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bugged toy system (/showthread.php?tid=492594)



Bugged toy system - FaZeRs - 04.02.2014

Toys are not saving after you are reloging or removing them.

My Toy system
http://pastebin.com/uACs4qhE

Please hope someone can help me because i can't just fix them.


Re: Bugged toy system - FaZeRs - 04.02.2014

SOMEONE HELP


Re: Bugged toy system - FaZeRs - 04.02.2014

Will they save if i will add this?

PHP код:
//Toy Editor
forward LoadToys(playerid,name[],value[]);
public 
LoadToys(playerid,name[],value[])
{
 
        if (!
strcmp(name"ptindex")){ PlayerToyInfo[playerid][ptindex] = strval(value); }
        if (!
strcmp(name"ptmodelid")){ PlayerToyInfo[playerid][ptmodelid] = strval(value); }
        if (!
strcmp(name"ptboneid")){ PlayerToyInfo[playerid][ptboneid] = strval(value); }
        if (!
strcmp(name"ptfOffsetX")){ PlayerToyInfo[playerid][ptfOffsetX] = strval(value); }
        if (!
strcmp(name"ptfOffsetY")){ PlayerToyInfo[playerid][ptfOffsetY] = strval(value); }
        if (!
strcmp(name"ptfOffsetY")){ PlayerToyInfo[playerid][ptfOffsetZ] = strval(value); }
        if (!
strcmp(name"ptfRotX")){ PlayerToyInfo[playerid][ptfRotX] = strval(value); }
        if (!
strcmp(name"ptfRotY")){ PlayerToyInfo[playerid][ptfRotY] = strval(value); }
        if (!
strcmp(name"ptfRotZ")){ PlayerToyInfo[playerid][ptfRotZ] = strval(value); }
        if (!
strcmp(name"ptfScaleX")){ PlayerToyInfo[playerid][ptfScaleX] = strval(value); }
        if (!
strcmp(name"ptfScaleY")){ PlayerToyInfo[playerid][ptfScaleY] = strval(value); }
        if (!
strcmp(name"ptfScaleZ")){ PlayerToyInfo[playerid][ptfScaleZ] = strval(value); }
       
    
INI_Int("ptindex",PlayerToyInfo[playerid][ptindex]);
        
INI_Int("ptmodelid",PlayerToyInfo[playerid][ptmodelid]);
        
INI_Int("ptboneid",PlayerToyInfo[playerid][ptboneid]);
        
INI_Float("ptfOffsetX",PlayerToyInfo[playerid][ptfOffsetX]);
        
INI_Float("ptfOffsetY",PlayerToyInfo[playerid][ptfOffsetY]);
        
INI_Float("ptfOffsetZ",PlayerToyInfo[playerid][ptfOffsetZ]);
        
INI_Float("ptfRotX",PlayerToyInfo[playerid][ptfRotX]);
        
INI_Float("ptfRotY",PlayerToyInfo[playerid][ptfRotY]);
        
INI_Float("ptfRotZ",PlayerToyInfo[playerid][ptfRotZ]);
        
INI_Float("ptfScaleX",PlayerToyInfo[playerid][ptfScaleX]);
        
INI_Float("ptfScaleY",PlayerToyInfo[playerid][ptfScaleY]);
        
INI_Float("ptfScaleZ",PlayerToyInfo[playerid][ptfScaleZ]);
 
    return 
1;




Re: Bugged toy system - FaZeRs - 05.02.2014

I really need help with this one, because this is one of the last things i need to fix. I can pay someone if he fixes it.