Skin Change -
WiPaS - 25.08.2012
Hello. I have a really big problem. When i connect to server and when i want to select skin, it won't change's, always is CJ skin.
Thanks for answers
Re: Skin Change -
lamarr007 - 25.08.2012
If you want to add all skins, place this in your
OnGameModeInit()
pawn Код:
for(new skin = 1; skin < 300; skin++)
{
AddPlayerClass(skin, 2492.4285,-1679.4015,13.3375,60.6891, 0, 0, 0, 0, 0, 0);
}
Else look at
AddPlayerClass
Re: Skin Change -
=WoR=G4M3Ov3r - 25.08.2012
Show us your OnPlayerSpawn callback.
Nvm, was too late
Re: Skin Change -
_Khaled_ - 25.08.2012
https://sampwiki.blast.hk/wiki/Skins:All
look, Get what ever ID you like.
and add
pawn Код:
public OnGameModeInit()
{
SetGameModeText("Your GameMode Type");
UsePlayerPedAnims();
AddPlayerClass(2, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //class id 0
AddPlayerClass(265, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //class id 1
AddPlayerClass(287, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //class id 2
AddPlayerClass(164, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //class id 3
AddPlayerClass(275, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //class id 4
AddPlayerClass(278, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //class id 5
AddPlayerClass(/*ID FROM URL I POSTED*/, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //class id 6
return 1;
}
and in
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,x,y,z);
SetPlayerFacingAngle(playerid,180.0);
SetPlayerCameraPos(playerid,x,y,z);
SetPlayerCameraLookAt(playerid,x,y,z);
return 1;
}
Add these
Re: Skin Change -
WiPaS - 25.08.2012
Lammarr, i don't wanna add all skins, i selected which one's i use.
Here is callback:
Код:
public OnPlayerSpawn(playerid)
{
if(pInfo[playerid][Naujokas] == 0)
{
ShowPlayerDialog(playerid, tutorial, DIALOG_STYLE_MSGBOX, "{FEFA04}Sveiki atvykж б M-RPG!","{4BFE04}Ar юiыrлsite apmokymus?","Taip","Ne");
}
new npcname[MAX_PLAYER_NAME];
GetPlayerName( playerid, npcname, sizeof(npcname ) );
if(!strcmp(npcname, "Gabriele_Pagojyte", true ) )
{
SetPlayerSkin( playerid, 211 );
}
else if(!strcmp(npcname, "Viktorija_Pagojiene", true ) )
{
SetPlayerSkin( playerid, 193 );
}
//Position set
SetPlayerPos(playerid, -2667.642822, -5.458748, 6.132812);
//Clock
TextDrawShowForPlayer(playerid, SPClock[playerid]);
//Laikmaиiai
SetTimerEx("AtimamKura",1000*60*3, true,"i",playerid);
SetTimerEx("Informacijas",1000,true,"i",playerid);
SetTimerEx("LygioTimer",1000,true,"i",playerid);
//Nustatom false reiksmes
pPaliktas[playerid] = false;
new SStringas[128];
if(ikalintas[playerid] == true)
{
//SetPlayerPos(playerid, 245.0960, 1859.6161, 14.0840);
format(SStringas, 128, "~n~~n~~n~~n~~n~LIKO: %imin.", liko[playerid]);
GameTextForPlayer(playerid, SStringas, SECONDS(65), 0);
}
else
{
//SetPlayerPos(playerid, -1514.5477, 2522.2446, 55.8360);
}
return 1;
}
Re : Skin Change -
DaTa[X] - 25.08.2012
Код:
SetPlayerSkin(playerid,skinid);
or you can use
AddPlayerClass like this
Код:
AddPlayerClass(59,-199.6991,2705.6414,62.5327,224.9510,0,0,0,0,0,0);
AddPlayerClass(285,-138.8448,1136.8379,19.7500,336.0417,0,0,0,0,0,0);
Re: Skin Change -
WiPaS - 25.08.2012
_Khaled_, i already done that, but skin's won't changing
Re: Skin Change -
_Khaled_ - 25.08.2012
Edited my post, mine is the best so you can CHOOSE, from the IDs..
Test and come back
Re: Skin Change -
WiPaS - 25.08.2012
Here is my code now
Init:
Код:
AddPlayerClass(12,-2717.6223,-7.3075,4.1797, 93.411674, 0, 0, 0, 0, 0, 0);
AddPlayerClass(13,-2717.6223,-7.3075,4.1797, 93.411674, 0, 0, 0, 0, 0, 0);
AddPlayerClass(40,-2717.6223,-7.3075,4.1797, 93.411674, 0, 0, 0, 0, 0, 0);
AddPlayerClass(41,-2717.6223,-7.3075,4.1797, 93.411674, 0, 0, 0, 0, 0, 0);
AddPlayerClass(55,-2717.6223,-7.3075,4.1797, 93.411674, 0, 0, 0, 0, 0, 0);
AddPlayerClass(56,-2717.6223,-7.3075,4.1797, 93.411674, 0, 0, 0, 0, 0, 0);
AddPlayerClass(69,-2717.6223,-7.3075,4.1797, 93.411674, 0, 0, 0, 0, 0, 0);
AddPlayerClass(76,-2717.6223,-7.3075,4.1797, 93.411674, 0, 0, 0, 0, 0, 0);
AddPlayerClass(91,-2717.6223,-7.3075,4.1797, 93.411674, 0, 0, 0, 0, 0, 0);
AddPlayerClass(93,-2717.6223,-7.3075,4.1797, 93.411674, 0, 0, 0, 0, 0, 0);
and OnPlayerRequestClass
Код:
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -2667.642822, -5.458748, 6.132812);
SetPlayerFacingAngle(playerid, 93.411674);
SetPlayerCameraLookAt(playerid, -2667.642822, -5.458748, 6.132812);
SetPlayerCameraPos(playerid, -2667.642822 + (10 * floatsin(-93.411674, degrees)), -5.458748 + (10 * floatcos(-93.411674, degrees)), 6.132812);
And won't work, when i want to select skin it doesn't change always is CJ skin
Re: Skin Change -
_Khaled_ - 25.08.2012
SHow me your OnGameModeInt and OnPlayerRequestClass
Код:
This forum requires that you wait 120 seconds between posts. Please try again in 72 seconds.