public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(Spieler[playerid][skinchange] == 1)
{
if(newkeys & KEY_LOOK_LEFT)
{
pClasses[playerid] = pClasses[playerid] + 1;
if(pClasses[playerid] == 9)
{
pClasses[playerid] = 1;
}
if(pClasses[playerid] == 1)
{
SetPlayerSkin(playerid, 7);
}
if(pClasses[playerid] == 2)
{
SetPlayerSkin(playerid, 17);
}
if(pClasses[playerid] == 3)
{
SetPlayerSkin(playerid, 20);
}
if(pClasses[playerid] == 4)
{
SetPlayerSkin(playerid, 24);
}
if(pClasses[playerid] == 5)
{
SetPlayerSkin(playerid, 25);
}
if(pClasses[playerid] == 6)
{
SetPlayerSkin(playerid, 28);
}
if(pClasses[playerid] == 7)
{
SetPlayerSkin(playerid, 29);
}
if(pClasses[playerid] == 8)
{
SetPlayerSkin(playerid, 30);
}
}
if(newkeys & KEY_LOOK_RIGHT)
{
pClasses[playerid] = pClasses[playerid] - 1;
if(pClasses[playerid] == 0)
{
pClasses[playerid] = 8;
}
if(pClasses[playerid] == 1)
{
SetPlayerSkin(playerid, 7);
}
if(pClasses[playerid] == 2)
{
SetPlayerSkin(playerid, 17);
}
if(pClasses[playerid] == 3)
{
SetPlayerSkin(playerid, 20);
}
if(pClasses[playerid] == 4)
{
SetPlayerSkin(playerid, 24);
}
if(pClasses[playerid] == 5)
{
SetPlayerSkin(playerid, 25);
}
if(pClasses[playerid] == 6)
{
SetPlayerSkin(playerid, 28);
}
if(pClasses[playerid] == 7)
{
SetPlayerSkin(playerid, 29);
}
if(pClasses[playerid] == 8)
{
SetPlayerSkin(playerid, 30);
}
}
if(newkeys & KEY_JUMP)
{
Spieler[playerid][skin] = GetPlayerSkin(playerid);
SetPlayerCameraPos(playerid, -2780.5110, 1465.5461, 231.0950);
SetPlayerCameraLookAt(playerid, -2685.6938, 1758.3491, 159.7273);
SetPlayerPos(playerid, -1868.7306, 48.9485, 1055.2434);
pClasses[playerid] = 0;
SendClientMessage(playerid,0xFFFFFFF,"Ok, nun folgt das Tutorial!");
Spieler[playerid][tutorial] = 1;
Spieler[playerid][skinchange] = 1;
SetPlayerInterior(playerid,0);
}
return 1;
}
return 1;
}
Was ist falsch?