SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Portugus/Portuguese

Reply
 
Thread Tools Display Modes
Old 08/12/2018, 07:45 PM   #1
AztecaJr
Little Clucker
 
Join Date: Nov 2018
Posts: 33
Reputation: 0
Default Comando s para ADM

Preciso que esse cmd s funcione para adm do level 5. Desde j, agradeo.

Code:
if(strcmp(cmd, "/desban", true) == 0)
	{


		new tmp[30];
		tmp = strtok(cmdtext, idx);
		new serialid[164];
		serialid = tmp;
		if(!fexist("SerialBans.txt")) return SendClientMessage(playerid, 0x6EF83CFF, "    {FFFFFF}Serial ID");
		new File:sfile = fopen("SerialBans.txt", io_readwrite);
		new banstr[512], templine[1024];
		while(fread(sfile, banstr)) strcat(templine, banstr);
		fclose(sfile);
		new index = strfind(templine, serialid);
		if(index == -1) return SendClientMessage(playerid, 0x6EF83CFF, "    {FFFFFF}Serial ID {6EF83C} .");
		strdel(templine, index, index + SERIAL_LENGTH);
		sfile = fopen("SerialBans.txt", io_write);
		fwrite(sfile, templine);
		fclose(sfile);
		SendClientMessage(playerid, 0x6EF83CFF, "   :");
        new sstring[128];
		format(sstring, sizeof(sstring), "{FFFFFF}%s", serialid);
		SendClientMessage(playerid, -1, sstring);
		return 1;
	}
AztecaJr is offline   Reply With Quote
Old 08/12/2018, 07:51 PM   #2
Felipealves
Huge Clucker
 
Felipealves's Avatar
 
Join Date: Mar 2016
Location: Paran
Posts: 280
Reputation: 8
Default Re: Comando s para ADM

PHP Code:
// varivel do seu servidor, essa  s como exemplo.
new adminlvl[MAX_PLAYERS];
// topo do comando
if(!adminlvl[playerid] == 5) return SendClientMessage(playerid, -1"Voc no  admin lvl 5"); 
Felipealves is offline   Reply With Quote
Old 08/12/2018, 08:19 PM   #3
AztecaJr
Little Clucker
 
Join Date: Nov 2018
Posts: 33
Reputation: 0
Default Re: Comando s para ADM

Muito obrigado!!
AztecaJr is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Como fazer o comando /darbolsa dar bolsa para todos os players no so para os cops tristtok Portugus/Portuguese 8 29/09/2013 10:45 PM
[Ajuda] Comando para arrastar o player para o banco de trs da viatura.. duuuwh Portugus/Portuguese 8 24/10/2012 10:51 PM
[Ajuda] Comando de /equipar (mesmo comando, um texto para cada org) danqueiroz Portugus/Portuguese 9 21/04/2010 11:34 PM


All times are GMT. The time now is 08:35 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.