24.04.2013, 11:26
So this will be the correct code?
pawn Код:
CMD:p(playerid, params[]) {
new giveSz[32], param[128], param1[128], param2[128], param3[128], playerName[2][MAX_PLAYER_NAME], string[128];
if(sscanf(params,"s[32]s()[128]s()[128]s()[128]s()[128]", giveSz, param, param1, param2, param3)) {
SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/p [Option]");
SendClientMessage(playerid, COLOR_GREY, "Options: m");
return 1;
}
if(strcmp(giveSz, "m", true) == 0) {
if(isnull(param)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/p m [Message]");
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
format(string, sizeof(string), "(Megaphone) %s says: %s",szPlayerName , param);
nearByMessage(playerid, COLOR_HOTORANGE, string, 50.0);
}
return 1;
}