[HELP] OnPlayerUpdate
#1

Код:
public OnPlayerUpdate(playerid)
{
new flag;
if((IsPlayerInRangeOfPoint(playerid, 8.0, 3623.3948,-338.8084,5.8228))&& DoesPlayerHasTag(playerid,"[cos")&& flag == 0)
{
flag = 1;
MoveDynamicObject(c, 3623.00293, -338.80359, 13, 10);
}else{

flag = 0;
MoveDynamicObject(c, 3623.00293, -338.80359, 7.58847, 10);
}


if((IsPlayerInRangeOfPoint(playerid, 8.0, 3632.3701,-339.4589,5.8228))&& !DoesPlayerHasTag(playerid,"[cos")&& flag == 0)
{
SetDynamicObjectRot(tr1, 0, 90, 179.9398);
flag = 2;
}else{

flag = 0;
SetDynamicObjectRot(tr1, 0, 0, 179.9398);
}

if((IsPlayerInRangeOfPoint(playerid, 8.0, 3674.54150, -358.16077,5.8228))&& !DoesPlayerHasTag(playerid,"[cos")&& flag == 0)
{

SetDynamicObjectRot(tr2, 0, 90, 179.9999);
flag = 3;
}else{

flag = 0;
SetDynamicObjectRot(tr2, 0, 0, 179.9999);
}

if((IsPlayerInRangeOfPoint(playerid, 8.0, 3716.73462, -320.60251,5.8228))&& !DoesPlayerHasTag(playerid,"[cos")&& flag == 0)
{

SetDynamicObjectRot(tr3, 0, 90, 179.9398);
flag = 4;
}else{

flag = 0;
SetDynamicObjectRot(tr3, 0, 0, 179.9398);
}

}

stock DoesPlayerHasTag(playerid,tag[]) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
return (strfind(name,tag,true) != -1);
}
I see all player afk, help me!!!
Reply
#2

I need help quickly!!!!
Reply
#3

Add return 1;
pawn Код:
}else{
        flag = 0;
        SetDynamicObjectRot(tr3, 0, 0, 179.9398);
    }
    // here
}
Reply
#4

thanks, but the object will rotate continuously if there are 2 players in the same area, help me
Reply
#5

Use
pawn Код:
native CreateDynamicSphere(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1);
and
pawn Код:
forward OnPlayerEnterDynamicArea(playerid, areaid);
forward OnPlayerLeaveDynamicArea(playerid, areaid);
Reply
#6

how does it fit?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)