I'm trying to edit a mod but when i connect to game none of the skins appear. It just only one skin and "<<" ">>" "Spawn" buttons wont work. How can I fix that?
Код:
enum Pedinfo
{
Class_Id,
Class_Name[128],
Spawn_TeamId,
Spawn_SkillId,
Spawn_SkinId,
Float:Spawn_X,
Float:Spawn_Y,
Float:Spawn_Z,
Float:Spawn_A
}
new Peds[][Pedinfo] = {
{0 ,"Hırsız" ,TEAM_HIRSIZ ,SKILL_HIRSIZ ,7 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{1 ,"Hırsız" ,TEAM_HIRSIZ ,SKILL_HIRSIZ ,21 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{2 ,"Hırsız" ,TEAM_HIRSIZ ,SKILL_HIRSIZ ,125 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{3 ,"Hırsız" ,TEAM_HIRSIZ ,SKILL_HIRSIZ ,179 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{4 ,"Hırsız" ,TEAM_HIRSIZ ,SKILL_HIRSIZ ,247 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{5 ,"Hırsız" ,TEAM_HIRSIZ ,SKILL_HIRSIZ ,299 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{6 ,"Fahise" ,TEAM_HIRSIZ ,SKILL_FAHISE ,152 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{7 ,"Fahise" ,TEAM_HIRSIZ ,SKILL_FAHISE ,64 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{8 ,"Fahise" ,TEAM_HIRSIZ ,SKILL_FAHISE ,237 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{9 ,"Hırsız" ,TEAM_HIRSIZ ,SKILL_FAHISE ,257 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{10 ,"Polis" ,TEAM_POLIS ,SKILL_POLIS ,265 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{11 ,"Polis" ,TEAM_POLIS ,SKILL_POLIS ,280 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{12 ,"Polis" ,TEAM_POLIS ,SKILL_POLIS ,282 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{13 ,"Polis" ,TEAM_POLIS ,SKILL_POLIS ,267 ,-213.359344, 979.493896, 19.332237, 272.853759 },
{14 ,"SWAT" ,TEAM_POLIS ,SKILL_SWAT ,285 ,-213.359344, 979.493896, 19.332237, 272.853759 },
{15 ,"FBI" ,TEAM_POLIS ,SKILL_FBI ,286 ,2294.083251, 2451.578369, 10.820312, 89.162681 },
{16 ,"Medic" ,TEAM_MEDIC ,SKILL_MEDIC,274 ,1608.0015,1824.9731,10.8203,0.9841 },
{17 ,"Medic" ,TEAM_MEDIC ,SKILL_MEDIC,276 ,1608.0015,1824.9731,10.8203,0.9841 },
Код:
public OnPlayerRequestClass(playerid, classid)
{
new string[256];
if(IsPlayerNPC(playerid)) return 1;
if(PlayerInfo[playerid][pClassselection] == 0)
{
SetPlayerPosEx(playerid,258.663269, -41.485324, 1002.023437, 84.496261,14,2);
SetPlayerCameraPos(playerid,255.136993, -41.532199, 1002.023437);
SetPlayerCameraLookAt(playerid,258.663269, -41.485324, 1002.023437);
/*
SetPlayerPosEx(playerid,1523.984619, -43.216495, 1002.130981, 179.918426,2,2);
SetPlayerCameraPos(playerid,1523.980102, -47.354228, 1003.130981);
SetPlayerCameraLookAt(playerid,1523.984619, -43.216495, 1002.130981);
//PlayerPlaySound(playerid, 1097, 0.0, 0.0, 0.0);
*/
if (PlayerInfo[playerid][pRegistered] == 0 && PlayerInfo[playerid][pLogged] == 0)
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT , "CnR Registration",string, "Register", "Cancel");
PlayerInfo[playerid][pClass] = classid;
PlayerInfo[playerid][pTeam] = Peds[classid][Spawn_TeamId];
PlayerInfo[playerid][pSkill] = Peds[classid][Spawn_SkillId];
}
if (PlayerInfo[playerid][pRegistered] == 1 && PlayerInfo[playerid][pLogged] == 0)
{
format(string, sizeof(string), "CnR\n \nThis name, %s, is Rgistered.\nIf this is not your account, please quit and change your name.\n \nPlease Enter Your Password To Login:",PlayerInfo[playerid][pName],playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT , "Login", string, "Login", "Cancel");
if (PlayerInfo[playerid][pResume] == 1)
{
classid = PlayerInfo[playerid][pClass];
}else{
format(string, sizeof(string), "%s",Peds[classid][Class_Name]);
GameTextForPlayer(playerid,string,5000,4);
PlayerInfo[playerid][pClass] = classid;
PlayerInfo[playerid][pTeam] = Peds[classid][Spawn_TeamId];
PlayerInfo[playerid][pSkill] = Peds[classid][Spawn_SkillId];
}
}
if (PlayerInfo[playerid][pRegistered] == 1 && PlayerInfo[playerid][pLogged] == 1)
{
if (PlayerInfo[playerid][pResume] == 1)
{
classid = PlayerInfo[playerid][pClass];
}else{
format(string, sizeof(string), "%s",Peds[classid][Class_Name]);
GameTextForPlayer(playerid,string,5000,4);
PlayerInfo[playerid][pClass] = classid;
PlayerInfo[playerid][pTeam] = Peds[classid][Spawn_TeamId];
PlayerInfo[playerid][pSkill] = Peds[classid][Spawn_SkillId];
}
}
PlayerInfo[playerid][pJustDied] = 0;
PlayerInfo[playerid][pKilledUnFairly] = 0;
PlayerInfo[playerid][pSpawn] = 0;
}
SetPlayerSkin(playerid,Peds[classid][Spawn_SkinId]);
SetSpawnInfo(playerid,Peds[classid][Spawn_TeamId], Peds[classid][Spawn_SkinId], Peds[classid][Spawn_X], Peds[classid][Spawn_Y], Peds[classid][Spawn_Z], Peds[classid][Spawn_A], 0,0, 0,0, 0,0);
return 1;
Skins are changing when I get new username and connect but when I connect with registered one nothing happens just 1 skin :/