Das ist doch nicht dein Ernst??
Da wird es abgefragt; guck mal auf SampWiki.
versteh ich net? was soll nicht sein ernst sein?
bei mir klappts soweit .. komisch
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/work", true))
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 511 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 519 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 593)//Beagle+Dodo+Shamal
{
SendClientMessage(playerid, 0xFFFFFFFF, "jo1");
return 1;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 488 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 497 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 548 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 563)//helis
{
SendClientMessage(playerid, 0xFFFFFFFF, "jo2");
return 1;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 417 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 425 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 447 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 469 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 487)
{
SendClientMessage(playerid, 0xFFFFFFFF, "jo3");
return 1;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 592 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 577)
{
SendClientMessage(playerid, 0xFFFFFFFF, "jo4");
return 1;
}
return 0;
}
würde dir dennoch empfehlen ein switch zu benutzen.
edit:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/work", true))
{
switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
{
case 511,519,593:{}
case 488,497,548,563:{}
case 417,425,447,469,487:{}
case 592,577:{}
}
}
return 0;
}