Hallo Leute ich will einfach nur wissen was ich falsch mache... =(
Über allem:
forward busjob(playerid);
new Bus[MAX_PLAYERS];
in OnPlayerCommandText:
if(PlayerToPoint(2, playerid,-2473.8230,776.9612,36.1259))
{
if (strcmp("/busjob", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0x33CCFFAA,"Herzlichen Glückwunsch zu deinem neuem Beruf: Busfahrer.");
SetPlayerSkin( playerid, 122);
Bus[playerid] = 1;
return 1;
}
}
In OnPlayerStateChange:
if(GetPlayerVehicleID(playerid) == 437 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(Bus[playerid] == 0)
{
SendClientMessage(playerid,0xAAAAAAAA,"Du bist kein Busfahrer!");
SetTimer("busjob", 4000, true);
RemovePlayerFromVehicle(playerid);
return 1;
}
}
Und ganz unten:
public busjob(playerid)
{
SendClientMessage(playerid, 0xAFAFAFAA, "Du bist kein Busfahrer.");
}
Danke schonmal im Vorraus!