Help House of Death
#1

Hello, I wanted some help here at my command, I am having problems after building the house he lives of those who are taking it, I tried putting the "IsPlayerInRangeOfPoint" in "OnPlayerUpdate" and was taking life after logging into the server, can help me with this?

pawn Код:
CMD:house(playerid, params[])
{
if(PlayerDados[playerid][Admin] < 1) return SendClientMessage(playerid, VERMELHO, "[ERROR] - You do not have Admin");
SetTimerEx("HouseD",0,false,"i",playerid);
return 1;
}

forward HouseD(playerid);
public HouseD(playerid)
{
    new Float:X, Float:Y, Float:Z, Float:A;
    new barril;
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, A);
    PosicaoFrentePlayer(playerid, X, Y, 10);
    barril = housewood= CreateObject(18259, X, Y, Z-30, 0.0, -0.0, A-0, 300.0);
    Barris[tBarris] = barril;
    tBarris ++;
    PosicaoFrentePlayer(playerid, X, Y, 30);
    MoveObject(housewood,X,Y-1,Z, 5.00);
    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
    format(String, sizeof(String), "{8B4513}%s: Creation of the House of Wood!", Nome(playerid));
    ProxDetector(10.0, playerid, String, WHITE,WHITE,WHITE,WHITE,WHITE);
    if(IsPlayerInRangeOfPoint(housewood, 1.5, x,y,z))
    {
        SetTimerEx("HouseDeath",10000,true,"i",playerid);
    }
    return true;
}
(OBS:The SetTimer "housed" will take every player's life 10000 seconds)
Reply
#2

Why do you use a timer with no time to call a function? Simply instead of that use HouseD(playerid);.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)