Hey, Com!
Ich hab ein Problem, wenn ich auf meinen Server connecte, komme ich automatisch zur Skinauswahl.
Ich möchte diese Skinauswahl jedoch nur auf Anfrage hin abrufe, also nur, wenn man F4 drückt und stirbt.
Nicht IMMER am Anfang.
Jetzt soll natürlich der Skin gespeichert werden. Ich hab schon sämtliche Threads durchsucht und bis jetzt
hat nichts funktioniert..
Ich nutze dini. Und dazu enum.
Hier ein paar Zeilen:
enum Info
{
AdminLevel,
Leader,
sex,
age,
logged,
}
new pInfo[MAX_PLAYERS][Info];
dini_Create(path);
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,1738.9098,-1948.2825,14.1172);
SetPlayerFacingAngle(playerid,177.2759);
SetPlayerCameraPos(playerid,1738.9277,-1951.4822,14.1172);
SetPlayerCameraLookAt(playerid,1738.9098,-1948.2825,14.1172);
switch(classid)
{
case 0,1,2,3,4,5: gTeam[playerid] = TEAM_GROVE;
case 6,7,8: gTeam[playerid] = TEAM_BALLAS;
case 9,10,11: gTeam[playerid] = TEAM_VAGOS;
case 12,13,14,15,16,17,18,19: gTeam[playerid] = TEAM_COPS;
case 20,21,22: gTeam[playerid] = TEAM_AZTECAS;
case 23,24,25: gTeam[playerid] = TEAM_TRIADEN;
default: gTeam[playerid] = TEAM_ZIVILISTEN;
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYER_NAME], path[200];
GetPlayerName(playerid, pname, sizeof(pname));
format(path, sizeof(path), "/spieler/%s.ini", pname);
dini_IntSet(path, "sex", pInfo[playerid][sex]);
dini_IntSet(path, "age", pInfo[playerid][age]);
dini_IntSet(path, "AdminLevel", pInfo[playerid][AdminLevel]);
dini_IntSet(path, "Leader", pInfo[playerid][Leader]);
pInfo[playerid][logged] = 0;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_COPS)
{
SetPlayerPos(playerid,1568.7911,-1691.0333,5.8906);
}
else if(gTeam[playerid] == TEAM_GROVE )
{
SetPlayerPos(playerid,2496.0425,-1694.8163,1014.7422);
SetPlayerInterior(playerid,3);
SetPlayerVirtualWorld(playerid,39);
SetPlayerFacingAngle(playerid,0.9302);
}
else if(gTeam[playerid] == TEAM_BALLAS )
{
SetPlayerPos(playerid,318.564971,1118.209960,1083.882812);
SetPlayerInterior(playerid,5);
SetPlayerVirtualWorld(playerid,40);
}
else if(gTeam[playerid] == TEAM_VAGOS )
{
SetPlayerPos(playerid,244.7236,305.0915,999.1484);
SetPlayerInterior(playerid,1);
SetPlayerVirtualWorld(playerid,41);
SetPlayerFacingAngle(playerid,89.1031);
}
else if(gTeam[playerid] == TEAM_AZTECAS)
{
SetPlayerPos(playerid,2466.2881,-1698.2965,1013.5078);
SetPlayerInterior(playerid,2);
SetPlayerVirtualWorld(playerid,42);
SetPlayerFacingAngle(playerid,271.8825);
}
else if(gTeam[playerid] == TEAM_TRIADEN)
{
SetPlayerPos(playerid,1271.7618,-781.2479,1089.9375);
SetPlayerInterior(playerid,5);
SetPlayerVirtualWorld(playerid,43);
SetPlayerFacingAngle(playerid,91.5889);
}
clock();
return 1;
}
So, das waren wohl dich wichtigtsten Zeilen..
Ich komme einfach nicht weiter, hab schon viel versucht.
Der Skin wird weder geladen, noch gespeichert...Bitte helft mir.