/surf command
#1

Hi, so i wanted to make a vip command /surf that loops through players to see if they are surfing the vehicle in question and removes them from it. Youll get a better idea of what i mean from the code (hopefully lol). It uses zcmd.

pawn Код:
COMMAND:surf(playerid,params[])
{
    if(IsPlayerVipMember(playerid))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            for(new i; i <= 49; i++)
            {
                if(GetPlayerSurfingVehicleID(i) == GetPlayerVehicleID(playerid))
                {
                    SetPlayerVelocity(i,0.3,0.0,0.3);
                }
            }
        }
        else return SendClientMessage(playerid,Lred,"Error You Are Not In A Vehicle");
    }
    else return SendClientMessage(playerid,Lred,"Error You Are Not Vip");
    return 1;
}
I tryed to keep it simple don't get why its not working. Btw the loop is 49 as the server its going on is set to 50 players.
Thanks in advance.
Reply


Messages In This Thread
/surf command - by iggy1 - 15.07.2010, 11:33
Re: /surf command - by [DK]JaloNik - 15.07.2010, 12:06
Re: /surf command - by Hiddos - 15.07.2010, 12:21
Re: /surf command - by Finn - 15.07.2010, 12:47
Re: /surf command - by iggy1 - 15.07.2010, 12:55
Re: /surf command - by Finn - 15.07.2010, 13:07
Re: /surf command - by iggy1 - 15.07.2010, 13:10

Forum Jump:


Users browsing this thread: 3 Guest(s)