[help] save the skin and attachments also -
ntmp - 22.08.2014
hi everyone! i am a newbie obviously. so i need help. I am using COD7 gamemode by Excel and Lux Admin system. Everthing is fine
only i want is that when I (admin) change mine or someones skin the next time he spawns he will use the last skin that was changed by me. Is this possible? 
Also i want another feature known as clothes/player objects like the attachments system. Is there any script that can use all objects as clothes and also save them too??! and use mouse to position them
I will be thankful 
Also if you want to try my server than ask me i will give you the ip
Re: [help] save the skin and attachments also -
iFarbod - 22.08.2014
Yes it's possible. Declare a variable to save player's skin, and save it when player disconnects.
Re: [help] save the skin and attachments also -
AzaMx - 22.08.2014
I don't know about it at all, why you not post at his thread?
Re: [help] save the skin and attachments also -
iFarbod - 22.08.2014
Quote:
Originally Posted by AzaMx
I don't know about it at all, why you not post at his thread?
|
Don't turn the topic into off-topic.
OnTopic:
Step1: Declare a var to save player's skin:
Step2: Hook SetPlayerSkin to know player's current skin:
pawn Код:
stock MyLib_SetPlayerSkin(playerid, skinid)
{
// Call the old version, no need to check if it exists.
SetPlayerSkin(playerid, skinid);
pSkin[playerid] = skinid;
return 1;
}
#if defined _ALS_SetPlayerSkin
#undef SetPlayerSkin
#else
#define _ALS_SetPlayerSkin
#endif
#define SetPlayerSkin MyLib_SetPlayerSkin
Step3: Save pSkin to database/file when player disconnects.
Step4: Load pSkin from database/file when player connects.
Step5: Set Player's skin when spawn.
pawn Код:
public OnPlayerSpawn(playerid) { SetPlayerSkin(playerid, pSkin[playerid]); }
Please answer if i helped.
Don't Add Reputation also. Thanks.
Re: [help] save the skin and attachments also -
ntmp - 22.08.2014
Quote:
Originally Posted by iFarbod
Don't turn the topic into off-topic.
OnTopic:
Step1: Declare a var to save player's skin:
Step2: Hook SetPlayerSkin to know player's current skin:
pawn Код:
stock MyLib_SetPlayerSkin(playerid, skinid) { // Call the old version, no need to check if it exists. SetPlayerSkin(playerid, skinid); pSkin[playerid] = skinid; return 1; }
#if defined _ALS_SetPlayerSkin #undef SetPlayerSkin #else #define _ALS_SetPlayerSkin #endif
#define SetPlayerSkin MyLib_SetPlayerSkin
Step3: Save pSkin to database/file when player disconnects.
Step4: Load pSkin from database/file when player connects.
Step5: Set Player's skin when spawn.
pawn Код:
public OnPlayerSpawn(playerid) { SetPlayerSkin(playerid, pSkin[playerid]); }
Please answer if i helped.
Don't Add Reputation also. Thanks.
|
Thanks god someone helped me *-*
but when i respawned it loaded the old skin again.
i think it can never be changed unless i implement some code in gamemode.
coz the game takes me to select the selected skin on each spawn

Thanks man. This could help me in any other time

THANKS VERY MUCH


Re: [help] save the skin and attachments also -
ntmp - 22.08.2014
Quote:
Originally Posted by iFarbod
Yes it's possible. Declare a variable to save player's skin, and save it when player disconnects.
|
i think a 10 year kid know this too

Thanks :P i wanted the code dude . btw thanks