26.09.2009, 10:46
pawn Код:
if(strcmp(cmdtext, "/ffix", true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new curveh, newveh, model, Float:p[4], color1, color2;
curveh = GetPlayerVehicleID(playerid);
GetVehiclePos(curveh,p[0],p[1],p[2]);
GetVehicleZAngle(curveh,p[3]);
GetVehicleColors(curveh,color1,color2); // there are no GetVehicleColors function :X
model = GetVehicleModel(curveh);
DestroyVehicle(curveh);
newveh = CreateVehicle(model,p[0],p[1],p[2],p[3],color1,color2,60000);
PutPlayerInVehicle(playerid,newveh,0);
GameTextForPlayer(playerid, "~p~Sutaisyta",5000,5);
}
else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) return GameTextForPlayer(playerid, "Turi buti masinoi",5000,5);
else if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return GameTextForPlayer(playerid, "Turi buti vairuotojas",5000,5);
return 1;
}