13.10.2013, 23:40
Hello comrades pawn scripters I have a problem..
Something is wrong with my veh command maybe you could help me..
CMD:
Errors:
With best regards Scrillex!
Something is wrong with my veh command maybe you could help me..
CMD:
pawn Код:
CMD:veh(playerid, params[])
{
if (PlayerData[playerid][pAdmin] >= 3)
{
if(PlayerData[playerid][pAdminDuty] == 0 && PlayerData[playerid][pAdmin] < 6)
return Admin_Duty(playerid);
new iVehicle, iColors[2], szMessage[128];
if(sscanf(params, "iii", iVehicle, iColors[0], iColors[1]))
return SendClientMessage(playerid, COLOR_GRAD1, SYNTAX_MESSAGE"/veh [model ID] [color 1] [color 2]");
if(!(400 <= iVehicle <= 611))
return SendClientMessage(playerid, COLOR_GRAD2, "Invalid model specified (model IDs start at 400, and end at 611).");
if(!(0 <= iColors[0] <= 255 && 0 <= iColors[1] <= 255))
return SendClientMessage(playerid, COLOR_GRAD2, "Invalid colour specified (IDs start at 0, and end at 255).");
for(new iIterator; iIterator < sizeof(CreatedCars); iIterator++) if(CreatedCars[iIterator] == INVALID_VEHICLE_ID)
{
new Float: fVehPos[4];
GetPlayerPos(playerid, fVehPos[0], fVehPos[1], fVehPos[2]);
GetPlayerFacingAngle(playerid, fVehPos[3]);
CreatedCars[iIterator] = CreateVehicle(iVehicle, fVehPos[0], fVehPos[1], fVehPos[2], fVehPos[3], iColors[0], iColors[1], -1);
LinkVehicleToInterior(CreatedCars[iIterator], GetPlayerInterior(playerid));
SetVehicleVirtualWorld(CreatedCars[iIterator], GetPlayerVirtualWorld(playerid));
PutPlayerInVehicleEx(playerid, CreatedCars[iIterator], 0);
format(szMessage, sizeof szMessage, "You have spawned a %s (Veh ID: %i).", GetVehicleName(CreatedCars[iIterator]), CreatedCars[iIterator]);
return SendClientMessage(playerid, COLOR_GRAD1, szMessage);
}
}
else Invalid_Admin(playerid);
return 1;
}
pawn Код:
[02:42:19] [zcmd] [Tony Sentano]: /veh 411 1 1
[02:42:19] [debug] Run time error 6: "Invalid instruction"
[02:42:19] [debug] Unknown opcode 0x7800 at address 0xFFFFFFFF
[02:42:19] [debug] AMX backtrace:
[02:42:19] [debug] #0 ???????? in ?? () from Roleplay.amx
[02:42:19] [debug] Run time error 6: "Invalid instruction"
[02:42:19] [debug] Unknown opcode 0x7800 at address 0xFFFFFFFF
[02:42:19] [debug] AMX backtrace:
[02:42:19] [debug] #0 ???????? in ?? () from Roleplay.amx
[02:42:19] [debug] Run time error 6: "Invalid instruction"
[02:42:19] [debug] Unknown opcode 0x7800 at address 0xFFFFFFFF
[02:42:19] [debug] AMX backtrace:
[02:42:19] [debug] #0 ???????? in ?? () from Roleplay.amx