[pawn]dcmd_car(playerid,params[]) {
if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,red,error);
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, red, \"Használat: /car [Modellid/Név] [szín1] [szín2]\");
new car, colour1, colour2, string[128];
if(!IsNumeric(tmp)) car = GetVehicleModelIDFromName(tmp); else car = strval(tmp);
if(car < 400 || car > 611) return SendClientMessage(playerid, red, \"HIBA: nemlétezik ilyen modell vagy hibás a név\");
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); int1 = GetPlayerInterior(playerid);
LVehicleID = CreateVehicle(car, X+3,Y,Z, Angle, colour1, colour2, -1); LinkVehicleToInterior(LVehicleID,int1);
PlayerInfo[playerid][pCar] = LVehicleID;
CMDMessageToAdmins(playerid,\"CAR\");
format(string, sizeof(string), \"%s lerakott egy \\\"%s\\\" (Modell:%d) szín (%d, %d), ide %0.2f, %0.2f, %0.2f\", pName(playerid), VehicleNames[car-400], car, colour1, colour2, X, Y, Z);
SaveToFile(\"CarSpawns\",string);
format(string, sizeof(string), \"Leraktál egy a \\\"%s\\\" (Modell:%d) szín (%d, %d)\", VehicleNames[car-400], car, colour1, colour2);
return SendClientMessage(playerid,lightblue, string);
} else return SendClientMessage(playerid,red,\"HIBA: Ehez a parancshoz legalább 1-as szintû adminnak kéne lenned!\");
return 1;
}[/pawn]
D:\\Trucking_Server_2.0\\gamemodes\\Truck.pwn(2724) : error 017: undefined symbol \"strtok\"
D:\\Trucking_Server_2.0\\gamemodes\\Truck.pwn(2724) : error 033: array must be indexed (variable \"tmp2\")
D:\\Trucking_Server_2.0\\gamemodes\\Truck.pwn(2724) : error 017: undefined symbol \"strtok\"
D:\\Trucking_Server_2.0\\gamemodes\\Truck.pwn(2724) : 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.
pls help
Dupla hozzászólás automatikusan összefûzve. ( 2011. december 09. - 17:12:52 )
[pawn] new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); tmp3 = strtok(params,Index);[/pawn]
evel van a baj