18.04.2015, 12:49
I tried to make radio in range, but failed..
Code
PHP код:
./includes/commands.pwn(7087) : error 035: argument type mismatch (argument 1)
./includes/callbacks.pwn(5132) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
PHP код:
CMD:xe(playerid, params[])
{
new string[128];
if(isnull(params))
{
SendClientMessageEx(playerid, COLOR_GREY, "SUDUNG: /xe [name]");
SendClientMessageEx(playerid, COLOR_GREY, "Available names: Status, Khoidong, Denxe, Cop, Mui, Fuel, Windows");
return 1;
}
if(strcmp(params, "khoidong", true) == 0 && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new engine,lights,alarm,doors,bonnet,boot,objective,vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510 || DynVeh[vehicleid] != -1 && DynVehicleInfo[DynVeh[vehicleid]][gv_iType] == 1 && GetVehicleModel(vehicleid) == 592) return SendClientMessageEx(playerid,COLOR_WHITE,"Lenh nay khong the su dung trong chiec xe nay.");
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == VEHICLE_PARAMS_ON)
{
SetVehicleEngine(vehicleid, playerid);
format(string, sizeof(string), "{FF8000}** {C2A2DA}%s rut chia khoa ra, va dong co da tat.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if((engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET))
{
if (GetPVarInt(playerid, "Refueling")) return SendClientMessageEx(playerid, COLOR_WHITE, "Ban khong the lam dieu nay khi ban dang bo xang.");
format(string, sizeof(string), "{FF8000}** {C2A2DA}%s dut chia khoa vao, va dong co da mo.", GetPlayerNameEx(playerid));
GameTextForPlayer(playerid, "~y~Dong Co xe~n~~w~Da bat", 2000, 1);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SendClientMessageEx(playerid, COLOR_WHITE, "Dong co cua xe dang duoc mo, vui long cho...");
new Float:X, Float:Y, Float:Z, Float:Distance = 50.0;
GetPlayerPos(playerid, X, Y, Z);
SendAudioURLToRange(playerid, X, Y, Z, Distance, 1); //this line
PlayAudioStreamForPlayerEx(playerid, "http://www.pr-rp.com/gameserver/sounds/vehstart.mp3", X, Z, Y, Distance, 0);
SetTimerEx("SetVehicleEngine", 4000, 0, "dd", vehicleid, playerid);
}