12.09.2009, 17:11
Try wrapping it up a bit more, looks cleaner too.
pawn Код:
if(strcmp(cmdtext, "/8-track", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), -1399.23, -218.98, 1043.14);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 7);
ResetPlayerWeapons(playerid);
SendClientMessage(playerid, COLOR_GREEN1, "Welcome to the 8-track race.");
SetPlayerInterior(playerid, 7);
}
else
{
SendClientMessage(playerid, red, "You need to be in a vehicle to use this command");
}
return 1;
}