if(strcmp(cmd, "/whoisrc", true) == 0)
{
if(xxxxxx[playerid][xxxx] >= 1 || IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_GREEN,"Players in a RC vehicle");
new found, playername[MAX_PLAYER_NAME];
for(new i=0; i <= GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(i, playername, MAX_PLAYER_NAME);
new bool:searched = false;
if(searched != true)
{
if(IsPlayerInAnyVehicle(i))
{
if(GetVehicleModel(GetPlayerVehicleID(i) == 441 || 464 || 465 || 501 || 564 || 594))
{
found++;
format(string,sizeof(string),"Player: %s(%d) - RC Vehicle: %s", playername, i, VehNames[GetVehicleModel(GetPlayerVehicleID(i))-400]);
SendClientMessage(playerid, COLOR_GREEN,string);
searched = true;
}
else searched = false;
}
}
}
}
if(found == 0) SendClientMessage(playerid, COLOR_GREEN, "There are no players in a RC vehicle");
}
else return 0;
return 1;
}
So whats wrong?
You gotta tell us what errors you get or something. |
Players in RC vehicle Player: Myname | RC Vehicle: Beagle |
if(GetVehicleModel(GetPlayerVehicleID(i)) == 441 || GetVehicleModel(GetPlayerVehicleID(i)) == 464 || GetVehicleModel(GetPlayerVehicleID(i)) == 465 || GetVehicleModel(GetPlayerVehicleID(i)) == 501 || GetVehicleModel(GetPlayerVehicleID(i)) == 564 || GetVehicleModel(GetPlayerVehicleID(i)) == 594)
Код:
if(GetVehicleModel(GetPlayerVehicleID(i)) == 441 || GetVehicleModel(GetPlayerVehicleID(i)) == 464 || GetVehicleModel(GetPlayerVehicleID(i)) == 465 || GetVehicleModel(GetPlayerVehicleID(i)) == 501 || GetVehicleModel(GetPlayerVehicleID(i)) == 564 || GetVehicleModel(GetPlayerVehicleID(i)) == 594) |