Hello! This command can cause the server laggs? pl. object lag
Код:
if(strcmp(cmd, "/motozteszt", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsACop(playerid)) return Msg(playerid, "Nem tartozol rendvйdelmis szervezethez.");
if(!Munkarang(playerid, 2) && !LMT(playerid, LMUNKA_FBI)) return Msg(playerid, "Min 2 rang.");
if(FloodCheck(playerid,cmd)) return 1;
giveplayerid = GetClosestPlayer(playerid);
if(IsPlayerConnected(giveplayerid) || giveplayerid != INVALID_PLAYER_ID)
{
if(ProxDetectorS(2.0, playerid, giveplayerid))
{
if(giveplayerid == playerid)
return Msg(playerid, "not thyself! -.-");
if(GetPlayerSpecialAction(giveplayerid) != SPECIAL_ACTION_HANDSUP && !NemMozoghat(giveplayerid))
return Msg(playerid,"They do not have lifted a hand / no cuffed / bound / anime");
SetTimerEx("MotozasTimer", 20000, false, "i", playerid);
format(string, sizeof(string), "* Valaki megmotozza a cйlszemйlyt.");
ProxDetector(30.0, playerid,string , COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
TogglePlayerControllable(giveplayerid,0);
SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_HANDSUP);
SetPlayerChatBubble(playerid, "* megmotozza a cйlszemйlyt.", COLOR_PURPLE, 25.0, 6000);
ApplyAnimation(playerid, "SPRAYCAN", "spraycan_fire", 4.1, 1, 0, 20000, 20000, -1);
}
else
{
SendClientMessage(playerid, COLOR_ORANGE, "(( There's no one near you! ))");
return 1;
}
}
else
{
Msg(playerid,"there is no such player"");
return 1;
}
}
return 1;
}