Hey
Warum kann man die Skins nicht auswählen?
public OnPlayerText(playerid, text[])
{
new string[128], tmp[256];
if(strfind(text,"weiter",true) != -1)
{
if(UmZiehen[playerid] == 1)
{
SkinAuswahlsID[playerid] ++;
if(isPlayerInFrak(playerid,FraktionsSkins[SkinAuswahlsID[playerid]][FraktionsID]))
{
SetPlayerSkin(playerid,FraktionsSkins[SkinAuswahlsID[playerid]][fSkinID]);
return 0;
}
}
}
if(strfind(text,"zurück",true) != -1)
{
if(UmZiehen[playerid] == 1)
{
SkinAuswahlsID[playerid] --;
if(isPlayerInFrak(playerid,FraktionsSkins[SkinAuswahlsID[playerid]][FraktionsID]))
{
SetPlayerSkin(playerid,FraktionsSkins[SkinAuswahlsID[playerid]][fSkinID]);
return 0;
}
}
}
if(strfind(text,"fertig",true) != -1)
{
if(UmZiehen[playerid] == 1)
{
UmZiehen[playerid] = 0;
InviteFrak[playerid] = 0;
Spieler[playerid][Skin] = GetPlayerSkin(playerid);
SkinAuswahlsID[playerid] = 0;
UnfreezePlayer(playerid);
SendClientMessage(playerid,BLAU,"Du hast dich erfolgreich umgezogen!");
return 0;
}
}
enum INVITESKIN_INFO
{
fSkinID,
FraktionsID
}
new FraktionsSkins[][INVITESKIN_INFO] =
{
/*{2,0},{3,0},{6,0},{7,0},{14,0},{15,0},{18,0},{19,0},{20,0},{21,0},{22,0},{23,0},{24,0},{25,0},{26,0},{29,0},{37,0},{45,0},{66,0},{72,0},{73,0},{97,0},{101,0},{134,0},{137,0},{142,0},{180,0},{210,0},{217,0},{220,0},{230,0},{234,0},
{242,0},{262,0},{269,0},{9,0},{10,0},{11,0},{39,0},{41,0},{54,0},{55,0},{69,0},{77,0},{88,0},{89,0},{90,0},{93,0},{141,0},{190,0},{192,0},{199,0},{211,0},{243,0},{251,0},//Zivilisten
*/{163,1},{164,1},{265,1},{266,1},{267,1},{280,1},{281,1},{282,1},{283,1},{288,1},{163,1},{164,1},{265,1},{266,1},{267,1},{280,1},{281,1},{283,1},{288,1},//Polizei
{165,2},{266,2},{286,2},{294,2},{165,2},{166,2},{286,2},{294,2},//FBI
{70,3},{274,3},{275,3},{276,3},{193,3},//Sanitäter
{2,4},{3,4},{6,4},{7,4},{14,4},{15,4},{18,4},{19,4},{20,4},{21,4},{22,4},{23,4},{24,4},{25,4},{29,4},{37,4},{45,4},{66,4},{72,4},{73,4},{97,4},{101,4},{134,4},{137,4},{142,4},{156,4},{180,4},{210,4},{217,4},{220,4},{230,4},{234,4},
{242,4},{262,4},{286,4},{9,4},{10,4},{11,4},{39,4},{41,4},{54,4},{55,4},{69,4},{77,4},{88,4},{89,4},{90,4},{93,4},{141,4},{190,4},{192,4},{211,4},{243,4},{251,4},//Hitman
{60,5},{170,5},{188,5},{227,5},{240,5},{250,5},{56,5},{229},//News Reporter
{34,6},{44,6},{132,6},{133,6},{202,6},{206,6},{261,6},//Transport GmbH
{71,7},{50,7},{8,7},{233,7},//Ordnungsamt
{111,8},{112,8},{113,8},{124,8},{125,8},{126,8},{272,8},{40,8},//Russenmafia
{186,9},{204,9},{203,9},{228,9},{169,9},{224,9},//Yakuza
{102,10},{103,10},{104,10},{293,10},{13,10},//Ballas
{105,11},{106,11},{107,11},{269,11},{270,11},{271,11},//Grove Street
{46,12},{47,12},{48,12},{98,12},{223,12},{214,12},//Los Chickos Malos
{1,13},//Feuerwehr
{1,14},//Bundeswehr
{1,15},//Swat
{1,16},//Punkx Bikergang
{1,17},//Aztecas
{1,18},//Vagos
{1,19},//West Coast Custom
{1,20},//2Fast2Furious
{1,21}//Al Qaida
},
SkinAuswahlsID[MAX_PLAYERS],
UmZiehen[MAX_PLAYERS],
ocmd:umziehen(playerid,params[])
{
if(!IsPlayerInRangeOfPoint(playerid,5.0,215.2158,-155.4814,1000.5234))return SendClientMessage(playerid,ROT,"Du kannst dich hier nicht umziehen!");
if(UmZiehen[playerid] == 1)return SendClientMessage(playerid,ROT,"Du ziehst dich bereits um!");
SendClientMessage(playerid,HELLBLAU,"Benutze 'weiter', 'zurück' und 'fertig' um deinen Skin auszuwählen!");
SendClientMessage(playerid,HELLBLAU,"Schreibe es einfach ganz normal in den Chat.");
UmZiehen[playerid] = 1;
FreezePlayer(playerid);
return 1;
}
if(dialogid==DIALOG_INVITE)
{
if(response)
{
if(InviteFrak[playerid] == 0)
{
return SendClientMessage(playerid, ROT, "Du wurdest in keine Fraktion eingeladen.");
}
else
{
Spieler[playerid][Team] = InviteFrak[playerid];
UmZiehen[playerid] = 1;
SendClientMessage(playerid,HELLBLAU,"Benutze 'weiter', 'zurück' und 'fertig' um deinen Skin auszuwählen!");
SendClientMessage(playerid,HELLBLAU,"Schreibe es einfach ganz normal in den Chat.");
Spieler[playerid][Leader] = 0;
Spieler[playerid][Rank] = 0;
}
}
if(!response)
{
SendClientMessage(playerid, ROT, "Du hast die Einladung abgelehnt.");
return 1;
}
}