Ich hab ein problem ich frage mich wie man ein Frakspieler mit einem bestimmten Skin immer spawnen lässt
ich hab SetPkayerSkin versucht aber dann saved er nicht den skin
könnte mir jemand dabei helfen
Ich hab ein problem ich frage mich wie man ein Frakspieler mit einem bestimmten Skin immer spawnen lässt
ich hab SetPkayerSkin versucht aber dann saved er nicht den skin
könnte mir jemand dabei helfen
Ist überhaupt ein Speichersystem vorhanden?
Ja ist
mit einem enum system sozu sagen
Zeig uns mal den Code Abschnitt evtl hast du ein Fehler gemacht
else if(PlayerInfo[playerid][pTeam] == 7) //Hells Angels
{
SetPlayerPos(playerid,491.1263,-81.3639,998.7578); //Hells Angels Spawn
SetPlayerCameraPos(playerid, 490.0, 1200.0, 990.0);
SetPlayerSkin(playerid,284);
SetPlayerCameraLookAt(playerid, 491.1263,-81.3639,998.7578);
SetPlayerInterior(playerid, 11);
GivePlayerWeapon(playerid, 24, 1000);
}
Und wo speichert/lädt er deine ganzen Sachen?
SpielerSpeichern
else if(dialogid == 2)
{
if(!response) return 1;
else
{
if(response == 1)
{
if(IsPlayerConnected(playerid))
{
if(strlen(inputtext) > 24 || strlen(inputtext) < 4)
{
SendClientMessage(playerid, COLOR_GREY, "*:: Das Passwort muss mindestens 4 und maximal 24 Buchstaben lang sein. ::*");
SendClientMessage(playerid, COLOR_GREEN, "*:: Um das Registrierungs-Fenster wiederaufzurufen: *:: (/register) ::*");
return 1;
}
else
{
if(ReadRegister(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "*:: Du bist bereits registriert ::*");
return 1;
}
new pass[256], string[256];
format(PlayerInfo[playerid][pPassword], 24, "%s", inputtext);
format(pass, 256, "%s", PlayerInfo[playerid][pPassword]);
Encrypt(pass);
format(string, sizeof(string), "/User/%s.cer", ReadName(playerid));
new File: file = fopen(string, io_read);
if (file)
{
SendClientMessage(playerid, COLOR_GREY, "*::* Du bist bereits registriert *::*");
fclose(file);
return 1;
}
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
new File:hFile;
hFile = fopen(string, io_append);
new var[32];
format(var, 32, "%s\n", pass); fwrite(hFile, var);
format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]); fwrite(hFile, var);
format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]); fwrite(hFile, var);
format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]); fwrite(hFile, var);
format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pBank]); fwrite(hFile, var);
format(var, 32, "Team=%d\n",PlayerInfo[playerid][pTeam]); fwrite(hFile, var);
format(var, 32, "Leader=%d\n",PlayerInfo[playerid][pLeader]); fwrite(hFile, var);
format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMember]); fwrite(hFile, var);
format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]); fwrite(hFile, var);
format(var, 32, "Admin=%d\n",PlayerInfo[playerid][pAdmin]); fwrite(hFile, var);
format(var, 32, "Supporter=%d\n",PlayerInfo[playerid][pSupporter]); fwrite(hFile, var);
format(var, 32, "Skin=%d\n",PlayerInfo[playerid][pSkin]); fwrite(hFile, var);
format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]); fwrite(hFile, var);
format(var, 32, "FSkin=%d\n",PlayerInfo[playerid][pFSkin]); fwrite(hFile, var);
format(var, 32, "Knastzeit=%d\n",PlayerInfo[playerid][pKnastzeit]); fwrite(hFile, var);
format(var, 32, "Wanteds=%d\n",PlayerInfo[playerid][pWanteds]); fwrite(hFile, var);
format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]); fwrite(hFile, var);
format(var, 32, "JPoints=%d\n",PlayerInfo[playerid][pJPoints]); fwrite(hFile, var);
format(var, 32, "Knast=%d\n",PlayerInfo[playerid][pKnast]); fwrite(hFile, var);
format(var, 32, "Drogen=%d\n",PlayerInfo[playerid][pDrogen]); fwrite(hFile, var);
format(var, 32, "Materialien=%d\n",PlayerInfo[playerid][pMaterials]); fwrite(hFile, var);
format(var, 32, "Points=%d\n",PlayerInfo[playerid][pPoint]); fwrite(hFile, var);
format(var, 32, "Experince=%d\n",PlayerInfo[playerid][pExp]); fwrite(hFile, var);
format(var, 32, "Duty=%d\n",PlayerInfo[playerid][pDuty]); fwrite(hFile, var);
format(var, 32, "Respekt=%d\n",PlayerInfo[playerid][pRespekt]); fwrite(hFile, var);
format(var, 32, "Nummer=%d\n",PlayerInfo[playerid][pNummer]); fwrite(hFile, var);
format(var, 32, "Buch=%d\n",PlayerInfo[playerid][pBuch]); fwrite(hFile, var);
format(var, 32, "AutoLiz=%d\n",PlayerInfo[playerid][pAutoLiz]); fwrite(hFile, var);
format(var, 32, "BikeLiz=%d\n",PlayerInfo[playerid][pBikeLiz]); fwrite(hFile, var);
format(var, 32, "FlugLiz=%d\n",PlayerInfo[playerid][pFlugLiz]); fwrite(hFile, var);
format(var, 32, "WaffLiz=%d\n",PlayerInfo[playerid][pWaffLiz]); fwrite(hFile, var);
format(var, 32, "AnglLiz=%d\n",PlayerInfo[playerid][pAnglLiz]); fwrite(hFile, var);
format(var, 32, "BootLiz=%d\n",PlayerInfo[playerid][pBootLiz]); fwrite(hFile, var);
format(var, 32, "LKWLiz=%d\n",PlayerInfo[playerid][pLKWLiz]); fwrite(hFile, var);
format(var, 32, "Kopfgeld=%d\n",PlayerInfo[playerid][pKopfgeld]); fwrite(hFile, var);
format(var, 32, "Opfer=%d\n",PlayerInfo[playerid][pOpfer]); fwrite(hFile, var);
format(var, 32, "Macher=%d\n",PlayerInfo[playerid][pMacher]); fwrite(hFile, var);
format(var, 32, "Auftrag=%d\n",PlayerInfo[playerid][pAuftrag]); fwrite(hFile, var);
format(var, 32, "Key=%d\n",PlayerInfo[playerid][pKey]); fwrite(hFile, var);
format(var, 32, "CarID=%d\n",PlayerInfo[playerid][pCarID]); fwrite(hFile, var);
fclose(hFile);
SendClientMessage(playerid, COLOR_WHITE, "*::* Du hast dich erfolgreich registriert! *::* (/login) *::*");
return 1;
}
}
}
else if(response == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "*:: Um das Registrierungs-Fenster wiederaufzurufen: *:: (/register) ::*");
return 1;
}
}
}
SpielerLaden
else if(dialogid == 3)
{
if(!response) return 1;
else
{
if(response == 1)
{
if(IsPlayerConnected(playerid))
{
if(strlen(inputtext) > 24 || strlen(inputtext) < 4)
{
SendClientMessage(playerid, COLOR_GREY, "*:: Das Passwort muss mindestens 4 und maximal 24 Buchstaben lang sein. ::*");
SendClientMessage(playerid, COLOR_GREEN, "*:: Um das Einloggungs-Fenster wiederaufzurufen: *:: (/login) ::*");
return 1;
}
else
{
if(ReadLogin(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "*:: Du bist bereits eingeloggt ::*");
return 1;
}
new pass[256];
format(pass, 255, "%s", inputtext);
Encrypt(pass);
OnPlayerLogin(playerid, pass);
/*if(PlayerInfo[playerid][pEingang] > 0)
{
new string[256];
format(string, 256, "*:: Du hast %d neue Nachrichten! ::*", PlayerInfo[playerid][pEingang]);
SendClientMessage(playerid, COLOR_GREY, string);
}*/
return 1;
}
}
}
Alles anzeigenelse if(PlayerInfo[playerid][pTeam] == 7) //Hells Angels
{
SetPlayerPos(playerid,491.1263,-81.3639,998.7578); //Hells Angels Spawn
SetPlayerCameraPos(playerid, 490.0, 1200.0, 990.0);
SetPlayerSkin(playerid,284);
SetPlayerCameraLookAt(playerid, 491.1263,-81.3639,998.7578);
SetPlayerInterior(playerid, 11);
GivePlayerWeapon(playerid, 24, 1000);
}
wenn der code unter OnPlayerSpawn ist wieso benutzt du dann SetPlayerCameraLookAt?
und zum speichern einfach:
PlayerInfo[playerid][pSkin] = Dein SKIN;
Ich hab was ausgeteste ist schon Längst gelöscht