12.09.2010, 22:33
Rebocar um arado...
no topo do gm:
no
no
para soltar o arado:
no topo do gm:
pawn Код:
new Arado;
pawn Код:
public OnGameModeInit( )
{
Arado = AddStaticVehicleEx (610, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 15 );
}
pawn Код:
//
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
new playerState = GetPlayerState(killerid);
if((newkeys == KEY_JUMP) && playerState == PLAYER_STATE_DRIVER)//Botao que pula....
{
new Float:vehx, Float:vehy, Float:vehz;
GetVehiclePos(Arado, vehx, vehy, vehz);
if(IsPlayerInRangeOfPoint(playerid,10.0,vehx, vehy, vehz))
{
AttachTrailerToVehicle(Arado, GetPlayerVehicleID(playerid));
}
}
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/soltarA", cmdtext, true, 10) == 0)
{
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
return 1;
}
return 0;
}