Üdv. csináltam egy parancsot ami elvileg ad nekem egy kocsit, meg fegyót páncélt hp-t. Az a gond, hogy minden mûködik benne, kivéve egy:
Nem hoz létre jármûvet, és így nem is rak bele a létrehozott jármûbe.
Itt a parancs:
[pawn]CMD:holymode(playerid,params[])
{
new string = random(12);
new Float:x, Float:y, Float:z, Float:angle;
new vehid;
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
if(!strcmp(pname, \"][HolyKing][\", true))
{
if(vehcreated == true)DestroyVehicle(holyveh);
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
switch(string)
{
case 1,4,7,10:
{
vehid = CreateVehicle(603, x,y,z, angle, 0, 0, 1000); //vehicle(Phoenix)(1)
SetVehicleVirtualWorld(vehid, 0);
ChangeVehiclePaintjob(vehid, 2);
LinkVehicleToInterior(vehid, 0);
AddVehicleComponent(vehid, 1007);
AddVehicleComponent(vehid, 1023);
AddVehicleComponent(vehid, 1074);
AddVehicleComponent(vehid, 1010);
AddVehicleComponent(vehid, 1087);
AddVehicleComponent(vehid, 1142);
AddVehicleComponent(vehid, 1018);
}
case 0,3,6,9,12:
{
vehid = CreateVehicle(551, x,y,z, angle, 0, 0, 1000); //vehicle(Merit)(1)
SetVehicleVirtualWorld(vehid, 0);
ChangeVehiclePaintjob(vehid, 3);
LinkVehicleToInterior(vehid, 0);
AddVehicleComponent(vehid, 1005);
AddVehicleComponent(vehid, 1006);
AddVehicleComponent(vehid, 1002);
AddVehicleComponent(vehid, 1097);
AddVehicleComponent(vehid, 1010);
AddVehicleComponent(vehid, 1087);
AddVehicleComponent(vehid, 1018);
}
case 2,5,8,11:
{
vehid = CreateVehicle(561, x,y,z, angle, 0, 0, 1000); //vehicle(Stratum)(1)
SetVehicleVirtualWorld(vehid, 0);
ChangeVehiclePaintjob(vehid, 3);
LinkVehicleToInterior(vehid, 0);
AddVehicleComponent(vehid, 1155);
AddVehicleComponent(vehid, 1061);
AddVehicleComponent(vehid, 1058);
AddVehicleComponent(vehid, 1064);
AddVehicleComponent(vehid, 1079);
AddVehicleComponent(vehid, 1010);
AddVehicleComponent(vehid, 1087);
AddVehicleComponent(vehid, 1056);
AddVehicleComponent(vehid, 1154);
}
}
vehcreated = true;
holyveh = vehid;
SetVehicleVirtualWorld(vehid, GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(vehid, GetPlayerInterior(playerid));
ChangeVehicleColor(vehid,0,3);
GivePlayerWeapon(playerid,23,5000);
SetPlayerArmour(playerid,100);
SetPlayerHealth(playerid,100);
}
else SendClientMessage(playerid,COLOR_RED,\"HIBA: Nem vagy jogosult a parancs használatára! Hasonló funkcióért keresd fel a fõadmint!\");
return 1;
}[/pawn]
Mi lehet a baja? :/