if(dialogid == DIALOG_SKIN)
{
if(response)
{
new skin = strval(inputtext);
if(skin < 0 || skin > 299)
{
ShowPlayerDialog(playerid, DIALOG_SKIN, DIALOG_STYLE_INPUT, "Skin Selection", "{FFFFFF}Select your skin.\n\n{FF0000}Invalid skin selected!", "Submit", "Quit");
}
else if(skin == 0 || skin == 1 || skin == 2 || skin == 8 || skin == 42 || skin == 50 || skin == 71 || skin == 165 || skin == 166 || skin == 240 || skin == 264 || skin == 265 || skin == 266 || skin == 267 || skin == 274 || skin == 275 || skin == 276 || skin == 277 || skin == 278 || skin == 279 || skin == 280 || skin == 281 || skin == 282 || skin == 283 || skin == 284 || skin == 285 || skin == 286 || skin == 287 || skin == 288)
{
ShowPlayerDialog(playerid, DIALOG_SKIN, DIALOG_STYLE_INPUT, "Skin Selection", "{FFFFFF}Select your skin.\n\n{FF0000}You may not use that skin!", "Submit", "Quit");
}
else
{
new string[54];
pInfo[playerid][pSkin] = strval(inputtext);
format(string, sizeof(string), "* [SERVER]: {FFFFFF}You've set your character's skin to %d", pInfo[playerid][pSkin]);
SendClientMessage(playerid, COLOR_WHITE, string);
TogglePlayerSpectating(playerid, 0);
TogglePlayerControllable(playerid, 1);
SetSpawnInfo(playerid, 0, pInfo[playerid][pSkin], 1685.8979, -2330.5691, -2.6797, 360, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
pInfo[playerid][pHealth] = 100;
SetPlayerScore(playerid, 1);
SetPlayerColor(playerid, TRANSPARENT_WHITE);
GivePlayerCash(playerid, 0);
SetCameraBehindPlayer(playerid);
pInfo[playerid][pInt] = 0;
pInfo[playerid][pVW] = 0;
pInfo[playerid][pLevel] = 1;
format(tmp2, sizeof(tmp2), "~g~Welcome ~n~~w~ %s", GetName(playerid));
GameTextForPlayer(playerid, tmp2, 5000, 1);
gPlayerLogged[playerid] = 1;
return 1;
}
}
if(!response)
{
format(qstring, sizeof(qstring), "* [AdmCMD]: You have chosen to 'Quit', you're always welcome to come back!");
SCM(playerid, COLOR_LIGHTRED, qstring);
SetTimerEx("kickbugfix", 1000, false, "i", playerid);
if(fexist(UserPath(playerid)))
{
fremove(UserPath(playerid));
}
}
}
public OnPlayerRequestClass(playerid, classid)
{
SetSpawnInfo(playerid, 0, pInfo[playerid][pSkin], 1685.8979/*X*/, -2330.5691/*Y*/, -2.6797/*Z*/, 360, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerSkin(playerid, pInfo[playerid][pSkin]);
SetPlayerPos(playerid, pInfo[playerid][pLastX], pInfo[playerid][pLastY], pInfo[playerid][pLastZ]);
SetPlayerFacingAngle(playerid, 360.0);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 0;
}
AddPlayerClass(skin, posx, posy, posz, 0, 0, 0, 0, 0, 0);
Add this to your OnGameModeInit
Код:
AddPlayerClass(skin, posx, posy, posz, 0, 0, 0, 0, 0, 0); |
Add this to your OnGameModeInit
Код:
AddPlayerClass(skin, posx, posy, posz, 0, 0, 0, 0, 0, 0); |
I don't have that in my other gamemode. It all works good there though.
|
well,you can solve it easily by :
when you spawn in blueberry,get the coordinates that you have spawned at exactly,just spawn and dont move,then search for it in the gamemode,and change it,thats all |
Haave you included enums to this gamemode/filterscript ? If not try adding them
|
enum PlayerInfo
{
Float:pFacingAngle,
Float:pHealth,
Float:pArmour,
Float:pLastX,
Float:pLastY,
Float:pLastZ,
}