25.09.2009, 12:10
Код:
if(strcmp(cmdtext, "/ffix", true) == 0) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { new curveh; new newveh; new Float:X,Float:Y,Float:Z; new Float:ang; new angle; new color1; new color2; curveh = GetPlayerVehicleID(playerid); GetPlayerPos(playerid,X,Y,Z); ang = GetVehicleZAngle(curveh,ang); GetVehicleColors(curveh,color1,color2); newveh = CreateVehicle(curveh,X,Y,Z,angle,color1,color2,60000); RemovePlayerFromVehicle(playerid); DestroyVehicle(curveh); SetVehicleZAngle(curveh,ang); PutPlayerInVehicle(playerid,newveh,0); GameTextForPlayer(playerid, "~p~Sutaisyta",5000,5); } else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { GameTextForPlayer(playerid, "Turi buti masinoi",5000,5); return 0; } else if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { GameTextForPlayer(playerid, "Turi buti vairuotojas",5000,5); return 0; } return 1; }