public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
if(response)
{
new rand = random(sizeof(MaleSkins));
SetPlayerSkin(playerid, MaleSkins[rand]);
}
else
{
new rand = random(sizeof(FemaleSkins));
SetPlayerSkin(playerid, FemaleSkins[rand]);
}
}
}
return 1;
}
OnPlayerRequestClass(playerid, classid)
{
TogglePlayerSpectating(playerid, 0);
SetSpawnInfo( playerid, 0, 0, 1649.8920,-2286.4458,-1.2098,180.2326, 26, 36, 28, 150, 0, 0 );
SpawnPlayer(playerid);
return 1;
}
native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
SetSpawnInfo( playerid, 0, 0, 1649.8920,-2286.4458,-1.2098,180.2326, 26, 36, 28, 150, 0, 0 );
since it Set his spawninfo as CJ skin so, SetSkin at onplayerspawn too by setting then checking variable like pSex[playerid] = MALE // or female |
if(PlayerInfo[playerid][Gender]==0)
{
new rand = random(sizeof(MaleSkin));
SetPlayerSkin(playerid, MaleSkin[rand]);
}
else
{
new rand = random(sizeof(FemaleSkin));
SetPlayerSkin(playerid, FemaleSkin[rand]);
}