Thread: /getvehicle
View Single Post
Old 02/03/2013, 12:09 AM   #1
NathNathii
Huge Clucker
 
Join Date: Mar 2012
Posts: 447
Reputation: 5
Question /getvehicle

A friend sent me this cmd, but i need it as zcmd.
If anyone could please help.

pawn Code:
dcmd_getvehicle(playerid,params[])

{

    if(AccInfo[playerid][Level] >= 3 || IsPlayerAdmin(playerid))

        {

            if(!strlen(params)) return

                SendClientMessage(playerid, LIGHTBLUE2, "Usage: /vget [VehicleID]") &&

                SendClientMessage(playerid, orange, "Function: Will Bring the specified Vehicle to your Position");

            new player1;

                new string[128];

            player1 = strval(params);

                SendCommandToAdmins(playerid,"VGet");

                new Float:x, Float:y, Float:z;

                GetPlayerPos(playerid,x,y,z);

                SetVehiclePos(player1,x+3,y,z);

                SetVehicleVirtualWorld(player1,GetPlayerVirtualWorld(playerid));

                format(string,sizeof(string),"You brought the Vehicle ID '%d' to your Position", player1);

                return SendClientMessage(playerid,BlueMsg,string);

        }

        else return ErrorMessages(playerid, 1);

}
NathNathii is offline   Reply With Quote