Mach das mal so:
new kaufveh[4];
//Dann das:
kaufveh[0] = AddStaticVehicle(402,-1955.7681,256.6182,40.8785,359.1914,39,39); // Buffalo
kaufveh[1] = AddStaticVehicle(603,-1946.7122,258.1071,40.8855,44.3233,18,1); // Phönix
kaufveh[2] = AddStaticVehicle(560,-1945.0530,274.2060,40.7528,137.7293,37,0); // Sultan
kaufveh[3] = AddStaticVehicle(556,-1955.9196,302.7108,41.4220,180.3202,1,1); // Monster
//Dann so abfragen:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate==PLAYER_STATE_DRIVER)
{
for(new i; i<sizeof(kaufveh); i++)="" {
if(GetPlayerVehicleID(playerid) == kaufveh[i]) {
SendClientMessage(playerid,-1,"moin!"),print("moin");
break;
}
}
}
return 1;
}
mfg.