SA-MP Forums Archive
Help with skins - 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: Help with skins (/showthread.php?tid=586112)



Help with skins - Toxik - 19.08.2015

its again me asking something as first let me tell you what I need
1. when player connect Skips the class selection
2. when player use the command /skin [ID] skin saves somewhere
3. when player connect the skin loads from the file
4. and when he disconnect skin saves


Re: Help with skins - PowerF - 19.08.2015

****** was founded 16 years ago,do you already use it?


Re: Help with skins - Roberto80 - 19.08.2015

Use this:
Код:
public OnPlayerConnect(playerid)
{
SpawnPlayer(playerid);
new file[128], pname[24];
GetPlayerName(playerid, pname, 24);
format(file, sizeof(file), "%s.ini", pname);
if(dini_Exists(file))
{
SetPlayerSkin(playerid,dini_Int(file,"skin");
}
return 1;
}
public OnPlayerDisconnect(playerid,reason)
{
new file[128], pname[24];
GetPlayerName(playerid, pname, 24);
format(file, sizeof(file), "%s.ini", pname);
if(dini_Exists(file))
{
dini_IntSet(file,"skin",GetPlayerSkin(playerid));
}
else
{
dini_Create(file);
dini_IntSet(file,"skin",GetPlayerSkin(playerid));
}
return 1;
}
Change it as u want and #include <dini>


Re: Help with skins - Mariciuc223 - 19.08.2015

I will not give you scripts because you need to learn .. i will tell you how to do:

Код HTML:
   - For the /skin id:
           @ You can use ZCMD & sscanf because it's very easy to use that includes ... Search on ****** a ZCMD + sscanf commands tutorial
   
   - For skin load/save:
           @ For the beginning, you can use y_ini by ****** , find that searching on ******. Also , you can find a tutorial how to use it too (on ******)
           @ You also can use mysql.
   
   - For class selection skip
           @ You can use a timer , set it when player typed the right password(logged in / if you have an register/login system) , before you made the timer you will made the forward with the public. There you can use SpawnPlayer(playerid);



Re: Help with skins - Toxik - 19.08.2015

Quote:
Originally Posted by Mariciuc223
Посмотреть сообщение
I will not give you scripts because you need to learn .. i will tell you how to do:

Код HTML:
   - For the /skin id:
           @ You can use ZCMD & sscanf because it's very easy to use that includes ... Search on ****** a ZCMD + sscanf commands tutorial
   
   - For skin load/save:
           @ For the beginning, you can use y_ini by ****** , find that searching on ******. Also , you can find a tutorial how to use it too (on ******)
           @ You also can use mysql.
   
   - For class selection skip
           @ You can use a timer , set it when player typed the right password(logged in / if you have an register/login system) , before you made the timer you will made the forward with the public. There you can use SpawnPlayer(playerid);
u confused me as hell