if(strcmp(cmd, "/meternocarro", true) ==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
{
if(CopOnDuty[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Nгo estбs em duty!");
}
if(PlayerCuffed[giveplayerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "O suspeito precisa ser algemado antes de ser posto no carro!");
}
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Precisas estar fora do carro para por o suspeito lб dentro.");
return 1;
}
if(IsPlayerConnected(giveplayerid))
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
new carid = gLastCar[playerid];
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
return SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "/meternocarro [playerid/PartOfName] [seatid]");
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
return SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "/meternocarro [playerid/PartOfName] [seatid]");
new seat = strval(tmp);
if(seat < 0 || seat > 3)
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "O seatid tem de ser entre 1 e 3");
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "0 - Condutor");
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "1 - Pendura");
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "2 - Passageiro");
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "3 - Passageiro");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Foste detido pelo agente %s .", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTYELLOW2, string);
format(string, sizeof(string), "Detes-te o suspeito %s .", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, string);
PlayerPlayerActionMessage(playerid,suspect,15.0,"% s pega o suspeito %s e mete-o dentro do carro.", sendername ,giveplayer);
GameTextForPlayer(giveplayerid, "~r~BUSTED", 2500, 3);
ClearAnimations(giveplayerid);
TogglePlayerControllable(giveplayerid, 0);
PutPlayerInVehicle(giveplayerid,carid,seat);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Precisas estar perto do teu carro!");
return 1;
}
}
else
{
format(string, sizeof(string), "%s nгo estб online", giveplayerid);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
return 1;
}
|