[Ajuda] Comandos..
#1

alguem poderia fazer o /vidap & /coletep

que desse vida para todos perto de mim e colete para todos perto..
alguem poderia? :3


Obg..
Reply
#2

strcmp ou zcmd/dcmd?
Reply
#3

strcmp.
Reply
#4

pawn Код:
if (!strcmp("/vidap", cmdtext, true))
    {
        static Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid,X,Y,Z)
        for(new i; i < MAX_PLAYERS; ++i)
        {
            if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z))
            {
                SetPlayerHealth(i,100);
            }
        }
        return 1;
    }
pawn Код:
if (!strcmp("/coletep", cmdtext, true))
    {
        static Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid,X,Y,Z)
        for(new i; i < MAX_PLAYERS; ++i)
        {
            if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z))
            {
                SetPlayerArmour(i,100);
            }
        }
        return 1;
    }
Reply
#5

(650 : error: 001: expected token: ";", but found "for"
650 : error: 001: expected token: ";", but found "for"

for(new i; i < MAX_PLAYERS; ++i) linha
Reply
#6

pawn Код:
if (!strcmp("/vidap", cmdtext, true))
   {
    static Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        for(new i; i < MAX_PLAYERS; ++i)
        {
            if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z))
            {
                SetPlayerHealth(i,100);
            }
        }
        return 1;
    }


if (!strcmp("/coletep", cmdtext, true))
    {
        static Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid,X,Y,Z);
        for(new i; i < MAX_PLAYERS; ++i)
        {
            if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z))
            {
                SetPlayerArmour(i,100);
            }
        }
        return 1;
    }
Reply
#7

vlw mlq.
+rep
Reply
#8

Isto deve resolver o seu problema :


pawn Код:
if(!strcmp(cmdtext, "/vidap", true))
    {
        new Float:P_Pos[3];
        GetPlayerPos(playerid, P_Pos[0], P_Pos[1], P_Pos[2]);
        for(new x = 0, y = GetMaxPlayers(); x != y; x++)
        {
            if(!IsPlayerInRangeOfPoint(x, 10.0, P_Pos[0], P_Pos[1], P_Pos[2]) || x == playerid) continue;
            SetPlayerHealth(x, 100.0);
        }
        SendClientMessage(playerid, 0xFF0000FF, "Todos os jogadores que estгo perto de vocк ganharam vida !");
        return 1;
    }
    if(!strcmp(cmdtext, "/coletep", true))
    {
        new Float:P_Pos[3];
        GetPlayerPos(playerid, P_Pos[0], P_Pos[1], P_Pos[2]);
        for(new x = 0, y = GetMaxPlayers(); x != y; x++)
        {
            if(!IsPlayerInRangeOfPoint(x, 10.0, P_Pos[0], P_Pos[1], P_Pos[2]) || x == playerid) continue;
            SetPlayerArmour(x, 100.0);
        }
        SendClientMessage(playerid, 0xFFFFFFAA, "Todos os jogadores que estгo perto de vocк ganharam colete !");
        return 1;
    }


Espero ter ajudado .
Reply
#9

Ajudou..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)