31.07.2014, 10:20
CMD:car(playerid,params[]) {
if ( pInfo[playerid][Adminlevel] < 0)
if(IsPlayerInVehicle(playerid, 32))return SendClientMessage(playerid,0x33CCFFAA,"{FF0000}[sD]:{808080}Вие не трябва да сте в автомобил!");
new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); tmp3 = strtok(params,Index);
if(!strlen(tmp)) return SendClientMessage(playerid, 0x33CCFFAA, "{808080}/car [Modelid/Name] [colour1] [colour2]");
if(IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,0x33CCFFAA,"{FF0000}[sD]:{808080}Ти вече си в превозно средсво");
new car, colour1, colour2, string[128];
if(!IsNumeric(tmp)) car = GetVehicleModelIDFromName(tmp); else car = strval(tmp);
if(!strlen(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);
if(!strlen(tmp3)) colour2 = random(126); else colour2 = strval(tmp3);
if(PlayerInfo[playerid][pCar] != -1 && !IsPlayerAdmin(playerid) ) CarDeleter(PlayerInfo[playerid][pCar]);
new LVehicleID,Float:X,Float:Y,Float:Z, Float:Angle,int1; GetPlayerPos(playerid, X,Y,Z); GetPlayerFacingAngle(playerid,Angle); DestroyVehicle( LVehicleID ); int1 = GetPlayerInterior(playerid)estroyVehicle( LVehicleID );
LVehicleID = CreateVehicle(car, X+3,Y,Z+3, Angle, colour1, colour2, -1); SetVehicleNumberPlate(LVehicleID, "{FF0000}[sD]"); LinkVehicleToInterior(LVehicleID,int1);GetPlayerIn terior(playerid);
PutPlayerInVehicle(playerid, LVehicleID, 0);
new vehicleid, engine, lights, alarm, doors, bonnet, boot, objective;
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, true, true, alarm, doors, bonnet, boot, objective);
SetVehicleNumberPlate(vehicleid, "ABCD 123");
PlayerInfo[playerid][pCar] = LVehicleID;
format(string, sizeof(string), "%s spawned a \"%s\" (Model:%d) colour (%d, %d), at %0.2f, %0.2f, %0.2f", pName(playerid), VehicleNames[car-400], car, colour1, colour2, X, Y, Z);
format(string, sizeof(string), "{FF0000}[CAR]:{808080}Вие взехте \"%s\" (Ид:%d) Цвят (%d, %d)", VehicleNames[car-400], car, colour1, colour2);
return SendClientMessage(playerid,lightblue, string);
} else return SendClientMessage(playerid,0x33CCFFAA,"ERROR: You need to be level 3 to use this command");
}
520: new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); tmp3 = strtok(params,Index);
(520) : error 017: undefined symbol "strtok"
(520) : error 033: array must be indexed (variable "tmp2")
(520) : error 017: undefined symbol "strtok"
(520) : fatal error 107: too many error messages on one line
if ( pInfo[playerid][Adminlevel] < 0)
if(IsPlayerInVehicle(playerid, 32))return SendClientMessage(playerid,0x33CCFFAA,"{FF0000}[sD]:{808080}Вие не трябва да сте в автомобил!");
new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); tmp3 = strtok(params,Index);
if(!strlen(tmp)) return SendClientMessage(playerid, 0x33CCFFAA, "{808080}/car [Modelid/Name] [colour1] [colour2]");
if(IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,0x33CCFFAA,"{FF0000}[sD]:{808080}Ти вече си в превозно средсво");
new car, colour1, colour2, string[128];
if(!IsNumeric(tmp)) car = GetVehicleModelIDFromName(tmp); else car = strval(tmp);
if(!strlen(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);
if(!strlen(tmp3)) colour2 = random(126); else colour2 = strval(tmp3);
if(PlayerInfo[playerid][pCar] != -1 && !IsPlayerAdmin(playerid) ) CarDeleter(PlayerInfo[playerid][pCar]);
new LVehicleID,Float:X,Float:Y,Float:Z, Float:Angle,int1; GetPlayerPos(playerid, X,Y,Z); GetPlayerFacingAngle(playerid,Angle); DestroyVehicle( LVehicleID ); int1 = GetPlayerInterior(playerid)estroyVehicle( LVehicleID );
LVehicleID = CreateVehicle(car, X+3,Y,Z+3, Angle, colour1, colour2, -1); SetVehicleNumberPlate(LVehicleID, "{FF0000}[sD]"); LinkVehicleToInterior(LVehicleID,int1);GetPlayerIn terior(playerid);
PutPlayerInVehicle(playerid, LVehicleID, 0);
new vehicleid, engine, lights, alarm, doors, bonnet, boot, objective;
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, true, true, alarm, doors, bonnet, boot, objective);
SetVehicleNumberPlate(vehicleid, "ABCD 123");
PlayerInfo[playerid][pCar] = LVehicleID;
format(string, sizeof(string), "%s spawned a \"%s\" (Model:%d) colour (%d, %d), at %0.2f, %0.2f, %0.2f", pName(playerid), VehicleNames[car-400], car, colour1, colour2, X, Y, Z);
format(string, sizeof(string), "{FF0000}[CAR]:{808080}Вие взехте \"%s\" (Ид:%d) Цвят (%d, %d)", VehicleNames[car-400], car, colour1, colour2);
return SendClientMessage(playerid,lightblue, string);
} else return SendClientMessage(playerid,0x33CCFFAA,"ERROR: You need to be level 3 to use this command");
}
520: new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); tmp3 = strtok(params,Index);
(520) : error 017: undefined symbol "strtok"
(520) : error 033: array must be indexed (variable "tmp2")
(520) : error 017: undefined symbol "strtok"
(520) : fatal error 107: too many error messages on one line