![]() |
#1 |
Big Clucker
![]() ![]() Join Date: Sep 2017
Posts: 69
Reputation: 40
|
![]() SkinEx Info This will change you'r skin and add smoke effect like in gta v! Function Code:
just like a_samp SetPlayerSkin(playerid, skinid); Click Pics ![]() ![]() ![]() Link Pastebin Update v1.1 Code:
Not much changes just reduced amx size v1 - 6kb v1.1 - 4kb Update v1.2 (credits to pottus) Code:
Made the effects better! Credits SA-MP Team - for samp Lokii - for SkinEx Incognito - for streamer Last edited by Lokii; 18/04/2018 at 10:55 AM. |
![]() |
![]() |
![]() |
#2 |
Little Clucker
![]() Join Date: Apr 2018
Location: India
Posts: 18
Reputation: 0
|
![]()
1st>>>>
This is easy and simple + good job |
![]() |
![]() |
![]() |
#3 |
Banned
![]() Join Date: Apr 2018
Location: Somewhere in the world.
Posts: 7
Reputation: 0
|
![]()
I could say it's something simple, but, something is something.
|
![]() |
![]() |
![]() |
#4 |
Little Clucker
![]() Join Date: Mar 2018
Location: /root/
Posts: 1
Reputation: 0
|
![]()
Good job, small but interesting
![]() |
![]() |
![]() |
![]() |
#5 |
Godfather
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2012
Location: Portugal
Posts: 7,147
Reputation: 774
|
![]()
Simple but interesting
|
![]() |
![]() |
![]() |
#7 |
Godfather
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2012
Posts: 5,352
Reputation: 1195
|
![]()
I like it but don't like it, the sync between the skin change / effects makes it look like shit. The user is aware of the new skin before any effects making the feel anti-climatic. The concept is excellent but the skin change is too fast and needs to be delayed slightly to sync better with the effects. There is also a major issue with object creation/deletion!
Code:
//Made by lokii. #include <streamer> //credits to incognito. #define SKIN_CHANGE_DELAY 600 /* native SetPlayerSkin(playerid, skinid); */ static p_skin_obj[MAX_PLAYERS] = { -1, ... }; static p_skin_obj2[MAX_PLAYERS] = { -1, ... } ; static DISTimer[MAX_PLAYERS]; static SkinTimer[MAX_PLAYERS]; forward DIS(playerid); public DIS(playerid) { TogglePlayerControllable(playerid, 1); DestroyDynamicObject(p_skin_obj[playerid]); return DestroyDynamicObject(p_skin_obj2[playerid]); } forward DelaySkinChange(playerid, skinid); public DelaySkinChange(playerid, skinid) { SetPlayerSkin(playerid, skinid); return 1; } static ResetSkinChange(playerid) { // This NEEDS to be done like this otherwise you will continually destory objects if(p_skin_obj[playerid] > -1) { DestroyDynamicObject(p_skin_obj[playerid]); DestroyDynamicObject(p_skin_obj2[playerid]); p_skin_obj[playerid] = -1; p_skin_obj2[playerid] = -1; } KillTimer(DISTimer[playerid]); KillTimer(SkinTimer[playerid]); } public OnPlayerDisconnect(playerid, reason) { ResetSkinChange(playerid); #if defined SE_OnPlayerDisconnect SE_OnPlayerDisconnect(playerid, reason); #endif return 1; } #if defined _ALS_OnPlayerDisconnect #undef OnPlayerDisconnect #else #define _ALS_OnPlayerDisconnect #endif #define OnPlayerDisconnect SE_OnPlayerDisconnect #if defined SE_OnPlayerDisconnect forward SE_OnPlayerDisconnect(playerid, reason); #endif stock SetPlayerSkinEx(playerid, skinid) { // Destory any created objects first ResetSkinChange(playerid); new Float:e_skin_x, Float:e_skin_y, Float:e_skin_z; GetPlayerPos(playerid, e_skin_x, e_skin_y, e_skin_z); TogglePlayerControllable(playerid, 0); p_skin_obj[playerid] = CreateDynamicObject(18671, e_skin_x, e_skin_y, e_skin_z-2.5, 0.0, 0.0, 0.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 100.0, STREAMER_OBJECT_DD, -1, 0); p_skin_obj2[playerid] = CreateDynamicObject(18728, e_skin_x, e_skin_y, e_skin_z-1.5, 0.0, 0.0, 0.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 100.0, STREAMER_OBJECT_DD, -1, 0); DISTimer[playerid] = SetTimerEx("DIS", 1000, false, "i", playerid); SkinTimer[playerid] = SetTimetEx("DelaySkinChange", false, "iii", SKIN_CHANGE_DELAY, playerid, skinid); Streamer_Update(playerid); return 1; } #if defined _ALS_SetPlayerSkin #undef SetPlayerSkin #else #define _ALS_SetPlayerSkin #endif #define SetPlayerSkin SetPlayerSkinEx //EOF. Last edited by Pottus; 17/04/2018 at 09:44 PM. |
![]() |
![]() |
![]() |
#8 | |
Big Clucker
![]() ![]() Join Date: Sep 2017
Posts: 69
Reputation: 40
|
![]() Quote:
yea thanks for that i changed the delay to 1000 tho you could still see the skin changing at 600 Update v1.2 (credits to pottus) Code:
Made the effects better! |
|
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|