08.06.2012, 17:05
pawn Код:
if (strcmp("/sirene", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
{
new type;
new VID = GetPlayerVehicleID(playerid);
if(strcmp(params, "d", type))
{
SendClientMessage(playerid, COLOR_WHITE, "USA: /sirene [tipo]");
SendClientMessage(playerid, COLOR_GRAD2, "Type: 1 = Em cima, 2 = Capф, 3 = Desligar.");
return 1;
}
switch(type)
{
case 1:
{
if(Siren[VID] == 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Este veнculo jб tкm sirene.!");
return 1;
}
new objectid = CreateObject(19419, 0, 0, 0, 0, 0, 0);
AttachObjectToVehicle(objectid, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000); //Object Model: 19419 |
PlayerActionMessage(playerid,15.0,"coloca a sirene no veнculo.");
return 1;
}
case 2:
{
if(Siren[VID] == 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Este veнculo jб tкm sirene.!");
return 1;
}
Siren[VID] = 1;
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
AttachObjectToVehicle(SirenObject[VID], VID, -0.43, 0.0, 0.785, 0.0, 0.1, 0.0);
PlayerActionMessage(playerid,15.0,"coloca a sirene no veнculo.");
return 1;
}
case 3:
{
if(Siren[VID] == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Este veнculo nгo tкm sirene.!");
return 1;
}
Siren[VID] = 0;
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
DestroyObject(SirenObject[VID]);
PlayerActionMessage(playerid,15.0,"retira a sirene no veнculo.");
return 1;
}
default:
{
SendClientMessage(playerid, COLOR_WHITE, "USA: /sirene [tipo]");
SendClientMessage(playerid, COLOR_GRAD2, "Type: 1 = Em cima, 2 = Capф, 3 = Desligar.");
}
}
}
else SendClientMessage(playerid, COLOR_GREY, "You're not authorised to use this command.");
return 1;
}