how to make a command?
#1

how to make /v <name> color like that it can be used by players please help me
Reply
#2

Can you describe your question more so we can help you ?
What do you mean by /v <name> ?
Reply
#3

this [Modelid/Name] [colour1] [colour2]
Reply
#4

Do you mean a Vehicle Spawner ?
Reply
#5

yes without dialog box
Reply
#6

pawn Код:
if(strcmp(cmd, "/veh", true, 10) == 0)
   
        {
        new String[200];
        new tmp[256];
        new Float:x, Float:y, Float:z;
       
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, l_red, "You didn't give a vehicle name");

        new vehicle = GetVehicleModelIDFromName(tmp);

        if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, l_red, "That vehicle name was not found");

        new Float:a;
        GetPlayerFacingAngle(playerid, a);
        GetPlayerPos(playerid, x, y, z);

        if(IsPlayerInAnyVehicle(playerid) == 1)
        {
            GetXYInFrontOfPlayer(playerid, x, y, 8);
        }
        else
        {
            GetXYInFrontOfPlayer(playerid, x, y, 5);
        }
       
        new PlayersVehicle = CreateVehicle(vehicle, x, y, z, a+90, -1, -1, -1);
        LinkVehicleToInterior(PlayersVehicle, GetPlayerInterior(playerid));

        format(String, sizeof(String), "You have spawned a %s", aVehicleNames[vehicle - 400]);
        SendClientMessage(playerid, l_green, String);
        return 1;
    }
Reply
#7

Код:
COMMAND:car(playerid, params[])
{
        new carid, carcolor1, carcolor2;
        if(!sscanf(params, "iii", carid, carcolor1, carcolor2))
        {
            if (carid == 432)
	    	return SendClientMessage(playerid, red, "Error: You Can not spawn a rhino / tank.");
	    	if (carid == 520)
	    	return SendClientMessage(playerid, red, "Error: You can not spawn a hydra.");
            if(carid >= 400 && carid <= 611)
            {
                if(carcolor1 >= 0 && carcolor1 <= 252)
                {
                    if(carcolor2 >= 0 && carcolor2 <= 252)
                    {
                        new Float:XZ, Float:YZ, Float:ZZ;
                        GetPlayerPos(playerid, XZ, YZ, ZZ);
                        SetVehicleVirtualWorld( CreateVehicle(carid, XZ+4, YZ, ZZ, 10, carcolor1, carcolor2, 0), GetPlayerVirtualWorld(playerid));
                        SendClientMessage(playerid, 0xD8D8D8FF, "Vehicle Spawned");
                        return 1;
                    }
                    else return SendClientMessage(playerid, 0xD8D8D8FF, "Only color id's between 0 and 252 are avaliable.");
                }
                else return SendClientMessage(playerid, 0xD8D8D8FF, "Only color id's between 0 and 252 are avaliable.");
            }
            else return SendClientMessage(playerid, 0xD8D8D8FF, "Only id's between 400 and 611 are avaliable.");
        }
        else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /car [VehicleId] [Color 1][Color 2]");
}
Reply
#8

i want in zcmd
Reply
#9

Do you want Pizza too ? How about making some code by yourself ? You can't create your server in browsing the forum by such questions homie.
Reply
#10

okay just this help please

EDIT:I Got it Clad
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)