Hallo Community,
ich wollte es so machen, dass mein Server die Skins speichert aber es geht iwie nicht so wie ich es mit vorgestellt hatte!
Also hier ist das, was ich versucht habe. (Aber nicht fertig, da ich nicht weiterwusset :P)
public OnPlayerRequestClass(playerid, classid)
{
new skin[20];
//Skins
//Männlich
skin[0]=AddPlayerClass(217,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[1]=AddPlayerClass(6,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[2]=AddPlayerClass(19,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[3]=AddPlayerClass(20,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[4]=AddPlayerClass(21,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[5]=AddPlayerClass(22,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[6]=AddPlayerClass(23,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[7]=AddPlayerClass(24,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[8]=AddPlayerClass(25,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[9]=AddPlayerClass(26,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[10]=AddPlayerClass(29,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
//Weiblich
skin[11]=AddPlayerClass(211,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[12]=AddPlayerClass(55,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[13]=AddPlayerClass(56,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[14]=AddPlayerClass(69,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[15]=AddPlayerClass(85,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[16]=AddPlayerClass(90,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
skin[17]=AddPlayerClass(152,1765.7042,-1896.7614,13.5632,270.0272,0,0,0,0,0,0); // Noobspawn|Bahnhof
SetPVarInt(playerid,"Skin",skin);
SetPlayerPos(playerid,1452.0470,-783.4221,93.4974);
SetPlayerFacingAngle(playerid,9.9160);
SetPlayerCameraPos(playerid,1448.8243,-776.7798,94.2226);
SetPlayerCameraLookAt(playerid,1452.0470,-783.4221,93.4974);
return 1;
}
stock SpielerSpeichern(playerid)
{
if(GetPVarInt(playerid,"loggedin")==1)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
dini_IntSet(Spielerdatei,"Level",GetPlayerScore(playerid));
dini_IntSet(Spielerdatei,"Geld",GetPlayerMoney(playerid));
dini_IntSet(Spielerdatei,"Adminlevel",GetPVarInt(playerid,"Adminlevel"));
dini_IntSet(Spielerdatei,"Fraktion",GetPVarInt(playerid,"Fraktion"));
dini_IntSet(Spielerdatei,"Skin",GetPVarInt(playerid,"Skin"));
dini_IntSet(Spielerdatei,"Baned",GetPVarInt(playerid,"Baned"));
}
return 1;
}
stock LoadAccount(playerid)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
GivePlayerMoney(playerid,dini_Int(Spielerdatei,"Geld"));
SetPVarInt(playerid,"Adminlevel",dini_Int(Spielerdatei,"Adminlevel"));
SetPVarInt(playerid,"Fraktion",dini_Int(Spielerdatei,"Fraktion"));
SetPVarInt(playerid,"Baned",dini_Int(Spielerdatei,"Baned"));
SetPVarInt(playerid,"Skin",dini_Int(Spielerdatei,"Skin"));
SetPVarInt(playerid,"loggedin",1);
if(GetPVarInt(playerid,"Baned")==1)
{
SendClientMessage(playerid,ROT,"Du bist vom Server gebannt.");
Kick(playerid);
}
if(GetPVarInt(playerid,"Skin")==217)
{
SetPlayerSkin(playerid,217);
}
if(GetPVarInt(playerid,"Skin")==6)
{
SetPlayerSkin(playerid,6);
}
if(GetPVarInt(playerid,"Skin")==19)
{
SetPlayerSkin(playerid,19);
}
if(GetPVarInt(playerid,"Skin")==20)
{
SetPlayerSkin(playerid,20);
}
if(GetPVarInt(playerid,"Skin")==21)
{
SetPlayerSkin(playerid,21);
}
if(GetPVarInt(playerid,"Skin")==22)
{
SetPlayerSkin(playerid,22);
}
if(GetPVarInt(playerid,"Skin")==23)
{
SetPlayerSkin(playerid,23);
}
if(GetPVarInt(playerid,"Skin")==24)
{
SetPlayerSkin(playerid,24);
}
if(GetPVarInt(playerid,"Skin")==25)
{
SetPlayerSkin(playerid,25);
}
if(GetPVarInt(playerid,"Skin")==26)
{
SetPlayerSkin(playerid,26);
}
if(GetPVarInt(playerid,"Skin")==29)
{
SetPlayerSkin(playerid,29);
}
if(GetPVarInt(playerid,"Skin")==211)
{
SetPlayerSkin(playerid,211);
}
if(GetPVarInt(playerid,"Skin")==55)
{
SetPlayerSkin(playerid,55);
}
if(GetPVarInt(playerid,"Skin")==56)
{
SetPlayerSkin(playerid,56);
}
if(GetPVarInt(playerid,"Skin")==69)
{
SetPlayerSkin(playerid,69);
}
if(GetPVarInt(playerid,"Skin")==85)
{
SetPlayerSkin(playerid,85);
}
if(GetPVarInt(playerid,"Skin")==90)
{
SetPlayerSkin(playerid,90);
}
if(GetPVarInt(playerid,"Skin")==152)
{
SetPlayerSkin(playerid,152);
}
return 1;
}
Würde mich über Hilfe freuen.
Ich weiß... habs echt nooblike versucht aber war ja ein versuch wert
Narushi