18.11.2015, 07:13
I have problem, i can't spawn all vehicle in another world..
What is the problem?
Thx
What is the problem?
PHP код:
forward CarSpawner(playerid,cmodel);
public CarSpawner(playerid,cmodel)
{
if(IsPlayerInAnyVehicle(playerid)) return 1;
if((PlayerInfo[playerid][Level] < 1) && ((cmodel == 425) || (cmodel == 520) || (cmodel == 447) || (cmodel == 464) || (cmodel == 476) || (cmodel == 432))) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be admin to spawn this vehicle");
return 1;
}
else
{
new Float:x, Float:y, Float:z, Float:angle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
new ctsvehicle=CreateVehicle(cmodel, x, y, z, angle, -1, -1, 10000);
PutPlayerInVehicle(playerid, ctsvehicle, 0);
SetVehicleVirtualWorld(ctsvehicle, GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(ctsvehicle, GetPlayerInterior(playerid));
VehicleInfo[ctsvehicle][Temp] = 1;
//ChangeVehicleColor(ctsvehicle,0,7);
}
return 1;
}