27.03.2013, 23:28
Eu queria saber se alguem tem um /arrastar igual do BPF eu acho que seria muito utiul no meu servidor!
if(strcmp(cmd, "/arrastar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pTanabolisante] > 0) return SendClientMessage(playerid,COLOR_GREY,"[AV] Vocк estб suspenso!");
if(!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo й um Cop!");
return 0x01;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, " [AV]: /arrastar [IdPLayer/ParteDoNome]");
return 0x01;
}
new newcar = GetPlayerVehicleID(playerid);
new playa;
playa = ReturnUser(tmp);
if(IsACopCar(newcar) || IsNgCar(newcar) || IsAnFbiCar(newcar))
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playa,x,y,z);
if(IsPlayerInRangeOfPoint(playerid, 5, x, y, z))
{
PutPlayerInVehicle(playa,newcar,2);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "[AV] %s colocou %s no camburгo.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new y1, m, d;
new h,mi,s;
getdate(y1,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /arrastar %s",d,m,y1,h,mi,s,sendername,giveplayer);
CommandLog(string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Jogador nгo estб prуximo a vocк.");
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб em um veнculo policial!");
}
}
return 0x01;
}