05.02.2010, 13:34
Hello, I have a problem with this one.
But for me it shows "MEGAPHONE: Police Officer %s: %s!!!" only.
Please help.
Код:
dcmd_m(playerid, params[]) { if(IsPlayerInAnyVehicle(playerid)) { new Vehicleid; Vehicleid = GetPlayerVehicleID(playerid); if(Vehicleid == police2) { new output[128], pName[MAX_PLAYER_NAME], str[157]; if(sscanf(params, "m", output)) SendClientMessage(playerid, COLOR_RED, "Usage: /m [message]"); else { GetPlayerName(playerid, pName, sizeof(pName)); format(str, sizeof(str), " MEGAPHONE: Police Officer %s: %s!!!", pName, output); ProxDetector(100.0, playerid, str, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW); } } else { SendClientMessage(playerid, COLOR_RED, "This vehicle is not equiped with a megaphone."); } } else { SendClientMessage(playerid, COLOR_RED, "You are currently not in any vehicle."); } return 1; }
Please help.