03.05.2015, 14:27
Hey all!
I have:
Help, please. +rep
I have:
Код:
BulgEdition.pwn(532) : error 035: argument type mismatch (argument 1) BulgEdition.pwn(534) : error 035: argument type mismatch (argument 1)
Код:
CMD:veh(playerid, params[]) { new Vehicle, VehicleID, Color[2], Siren, Float:pX, Float:pY, Float:pZ, Float:pA, string[123]; if(sscanf(params, "sD(1)D(1)D(1)", Vehicle, Color[0], Color[1], Siren)) return SendClientMessage(playerid, -1, "[USAGE]: /veh [VehicleName/VehicleID] [Color 1] [Color 2] [Siren 0/1]"); VehicleID = GetVehicleIDFromName(Vehicle); //error line 532 if(VehicleID == -1) { VehicleID = strval(Vehicle);//error line 534 if(VehicleID < 400 || VehicleID > 611) return SendClientMessage(playerid, -1, "[WARNING]: Invalid vehicle ID or Name!"); } if(Siren < 0 || Siren > 1) return SendClientMessage(playerid, -1, "[INFO]: Add siren 0/1. 0 - No, 1 - Yes."); GetPlayerPos(playerid, pX, pY, pZ); GetPlayerFacingAngle(playerid, pA); DestroyVehicle(SpawnedVehicle[playerid]); SpawnedVehicle[playerid] = CreateVehicle(VehicleID, pX, pY, pZ + 0.5, pA, Color[0], Color[1], -1, Siren); LinkVehicleToInterior(SpawnedVehicle[playerid], GetPlayerInterior(playerid)); PutPlayerInVehicle(playerid, SpawnedVehicle[playerid], 0); format(string, sizeof(string), "[INFO]: You successfully spawned %s (ID: %d). Enjoy it!", GetVehicleName(VehicleID), VehicleID); SendClientMessage(playerid, -1 , string); return 1; }