[Ajuda] administrador bloquear comando para todos - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] administrador bloquear comando para todos (
/showthread.php?tid=589399)
administrador bloquear comando para todos -
zPawnu - 18.09.2015
galera tipo eu queria fazer pra quando o admin digitasse /blockglobal ninguйm poderia digitar o comando /ooc e quando digitasse /unblockglobal todos poderiam digitar o comando
PHP код:
CMD:ooc(playerid,params[])
{
new Name[24], string[128], Texto[128];
if(sscanf(params, "s", Texto)) return SendClientMessage(playerid, -1, "Use: /ooc [Texto]");
GetPlayerName (playerid, Name, sizeof(Name));
format (string, sizeof(string), "{FF0000}[RADIO] {00BFFF}%s[%d] says:{00BFFF}{FFFFFF} %s{FFFFFF}", Name,playerid, Texto);
for(new i = 0; i < GetMaxPlayers(); i++)
SendClientMessage(i, -1, string);
return 1;
}
CMD:o(playerid, params[]) return cmd_ooc(playerid, params);
Re: administrador bloquear comando para todos -
zPain - 18.09.2015
PHP код:
new bool:blockGlobal;
CMD:blockglobal(playerid) {
if(admin) {
blockGlobal = true;
}
return 1;
}
CMD:unblockglobal(playerid) {
if(admin) {
blockGlobal = false;
}
return 1;
}
CMD:ooc(playerid,params[])
{
if(blockGlobal) return SendClientMessage(playerid, -1, "bloqueado.");
new Name[24], string[128], Texto[128];
if(sscanf(params, "s", Texto)) return SendClientMessage(playerid, -1, "Use: /ooc [Texto]");
GetPlayerName (playerid, Name, sizeof(Name));
format (string, sizeof(string), "{FF0000}[RADIO] {00BFFF}%s[%d] says:{00BFFF}{FFFFFF} %s{FFFFFF}", Name,playerid, Texto);
for(new i = 0; i < GetMaxPlayers(); i++)
SendClientMessage(i, -1, string);
return 1;
}
Re: administrador bloquear comando para todos -
zPawnu - 18.09.2015
Quote:
Originally Posted by zPain
PHP код:
new bool:blockGlobal;
CMD:blockglobal(playerid) {
if(admin) {
blockGlobal = true;
}
return 1;
}
CMD:unblockglobal(playerid) {
if(admin) {
blockGlobal = false;
}
return 1;
}
CMD:ooc(playerid,params[])
{
if(blockGlobal) return SendClientMessage(playerid, -1, "bloqueado.");
new Name[24], string[128], Texto[128];
if(sscanf(params, "s", Texto)) return SendClientMessage(playerid, -1, "Use: /ooc [Texto]");
GetPlayerName (playerid, Name, sizeof(Name));
format (string, sizeof(string), "{FF0000}[RADIO] {00BFFF}%s[%d] says:{00BFFF}{FFFFFF} %s{FFFFFF}", Name,playerid, Texto);
for(new i = 0; i < GetMaxPlayers(); i++)
SendClientMessage(i, -1, string);
return 1;
}
|
funfo mano te amo <3