20.08.2012, 13:10
pawn Код:
//Comando em ZCMD :
CMD:sirene(playerid)
{
if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_CIA)
{
if(IsPlayerInAnyVehicle(playerid))
{
new sireneOBJ[MAX_PLAYERS] = CreateObject(19419,0.0,0.0,0.0,0.0,0.0,0.0,100.0);
AttachObjectToVehicle(sireneOBJ[playerid],GetPlayerVehicleID(playerid),0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000);//Mude as coordenadas se esta estiver errada.
}else{
SendClientMessage(playerid,COR,"[ERRO]: Vocк nгo estб em um veiculo");
}
}else{
SendClientMessage(playerid,COR,"[ERRO]: Vocк nгo й um policial");
}
return 1;
}
Em CreateObject(... as coordenadas nгo importam , elas sу importam no AttachObjectToVehicle .
Adapte ao seu gamemode .