03.10.2014, 08:04
EDIT: Reworked cmd based on the enums but.
PHP Code:
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(5458) : error 017: undefined symbol "vEdit"
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(5458) : warning 215: expression has no effect
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(5458) : error 001: expected token: ";", but found "]"
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(5458) : error 029: invalid expression, assumed zero
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(5458) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
PHP Code:
CMD:editveh(playerid, params[])
{
new string[128], idx;
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pMapper] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(!mDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on Mapper Duty.");
if(sscanf(params, "i", idx)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /editveh [vehicleid]");
if(!vvvehInfo[idx][vvvModel]) return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle id.");
vEdit[playerid] = 1;
vEditID[playerid] = idx;
GetDynamicVehiclePos(vvvehInfo[idx][vvveh], vvvX[playerid][0], vvvY[playerid][1], vvvZ[playerid][2]);
GetDynamicVehicleRot(vvvehInfo[idx][vvveh], vvvAn[playerid][0], vvvC1[playerid][1], vvvC2[playerid][2]);
EditDynamicVehicle(playerid, vvvehInfo[idx][vvveh]);
format(string, sizeof(string), " You are now editing vehicle ID %d's position.", idx);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "MapperWarn: %s is editting vehicle ID %d's position.)", RPN(playerid), idx);
SendMapperMessage(COLOR_GREEN, 1, string);
return 1;
}