please help me :[
#1

Код:
dcmd_aveh(playerid, params[])
{
		new Float:X, Float:Y, Float:Z, Float:Angle;
        new vehicle = GetVehicleModelIDFromName(params);
        if(pInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE"");
        if(!strlen(params)) return SendClientMessage(playerid, COLOR_RED, "[USAGE] /aveh [Vehicle Name]");
        if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, COLOR_RED, "* Invalid Vehicle Name.");
        if(IsPlayerInAnyVehicle(playerid)) return  SendClientMessage(playerid,COLOR_RED,"* You Are Already In A Vehicle.");
        new string[128];
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
        format(string, sizeof(string), "* You have spawned a %s. ID: %i. ", VehicleNames[vehicle - 400], vehicle);
        SendClientMessage(playerid, COLOR_SKYBLUE, string);
        for(new i=0; i<MAX_CUSTOM_VEHICLES; i++)
        {
           if(!cVeh[i])
           {
            cVeh[i] = CreateVehicle(vehicle, X, Y, Z, Angle, 0, 0, 1200);
            PutPlayerInVehicle(playerid,cVeh[i],0);
            i = MAX_CUSTOM_VEHICLES;
            LinkVehicleToInterior(cVeh[i], GetPlayerInterior(playerid));
            SetVehicleVirtualWorld(cVeh[i], GetPlayerVirtualWorld(playerid));
           }
           return 1;
        }
        return 1;
}
so the problem is that i can only spawn one admin car and the rest wont spawn when i try to spawn it
Reply


Messages In This Thread
please help me :[ - by UrBoyJay - 12.01.2014, 03:22

Forum Jump:


Users browsing this thread: 2 Guest(s)