[AJUDA] ME AJUDA AE !
#1

qeria por comando pra so adm conseguir usa esse tele
agredeзo mt pela ajuda

pawn Код:
if(strcmp(cmdtext,"/campo",true)==0)
{
SetPlayerPos(playerid,1359.2698,2160.6514,11.0156);
SetPlayerInterior(playerid,0);
return 1;
}
   
    if(strcmp(cmdtext,"/barco",true)==0)
{
SetPlayerPos(playerid,-1473.4897,1489.1138,8.2501);
SetPlayerInterior(playerid,0);
return 1;
}
   
    if(strcmp(cmdtext,"/estadio",true)==0)
{
SetPlayerPos(playerid,3050.3301,-962.2635,13.0032);
SetPlayerInterior(playerid,0);
return 1;
}
   
    if(strcmp(cmdtext,"/arrancada",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"",4000,6);
LinkVehicleToInterior(vehicleid,0);
SetPlayerInterior(playerid,0);
return SetVehiclePos(vehicleid,-2129.5305,-972.6347,32.0234);
}
SetPlayerPos(playerid,-2129.5305,-972.6347,32.0234);
SetPlayerInterior(playerid,0);
return 1;
}
Reply
#2

Se for isso.
pawn Код:
if(strcmp(cmdtext,"/campo",true)==0)
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"[ERRO]: Vocк nгo й um admin rcon.");
    SetPlayerPos(playerid,1359.2698,2160.6514,11.0156), SetPlayerInterior(playerid,0);
    return true;
}

if(strcmp(cmdtext,"/barco",true)==0)
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"[ERRO]: Vocк nгo й um admin rcon.");
    SetPlayerPos(playerid,-1473.4897,1489.1138,8.2501), SetPlayerInterior(playerid,0);
    return true;
}

if(strcmp(cmdtext,"/estadio",true)==0)
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"[ERRO]: Vocк nгo й um admin rcon.");
    SetPlayerPos(playerid,3050.3301,-962.2635,13.0032), SetPlayerInterior(playerid,0);
    return true;
}

if(strcmp(cmdtext,"/arrancada",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"[ERRO]: Vocк nгo й um admin rcon.");
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
    LinkVehicleToInterior(vehicleid,0), SetPlayerInterior(playerid,0);
    SetVehiclePos(vehicleid,-2129.5305,-972.6347,32.0234);
    SetPlayerPos(playerid,-2129.5305,-972.6347,32.0234), SetPlayerInterior(playerid,0);
    return true;
}
Reply
#3

Explica pra ele q tem q logar na rcon pra usar o cmd
Reply
#4

brigado.
mas alguem de vcs sabe, por tipo, en vez de ser na rcon todos os adm pode ?
Reply
#5

Apenas mande a variavel de adm do seu gm/fs
Reply
#6

ai esta, fazendo um favor queria q para fazer esse cmd tem q ser pelo menos sub/master pracima possa fazer esse cmd
Agradeзo desde jб !

pawn Код:
#define SUB_MODERADOR            1
#define MODERADOR                2
#define AUXILIAR                 3
#define SUB_MASTER               4
#define MASTER                   1337
#define SUB_GERENTE              1338
#define GERENTE                  1339
#define SUB_DONO                 1340
#define DONO                     1341
Reply
#7

Mande as variaveis naum os Defines . concerteza estarao em algum enum.
Reply
#8

como vai ta o nome
enum admin ?
eu so iniciante com pawno
me ajuda ae
Reply
#9

Poste Algum Comando de ADM que Nao presise Estar Logado na rcon por favor.
Reply
#10

aki a enum de admin

pawn Код:
enum Admin
{
gMembro[MAX_PLAYER_NAME],AdminVaga,
};
enum Helper
{
hMembro[MAX_PLAYER_NAME],HelperVaga,
};
new AdmInfo[31][Admin];new HelperInfo[21][Helper];

public HelperCheck(playerid){new idx = 0;while(idx < sizeof(HelperInfo)){if(strcmp(HelperInfo[idx][hMembro],PlayerName(playerid), true ) == 0 ){return true;}idx++;}return 0;}

public HelpersVaga()
{
new storedcopname[64];
new File: file = fopen("BrasilGames/Helpers.cfg", io_read);
if (file)
{
new valtmp[MAX_PLAYER_NAME];
while (fread(file, valtmp) > 0)
{
strmid(storedcopname, valtmp, 0, strlen("Vazio"), 255);
if ((strcmp(storedcopname, "Vazio", true, strlen("Vazio")) == 0) && (strlen("Vazio") == strlen(storedcopname)))
{
fclose(file);VagaSobrando = 1;
return true;
}
}
}
fclose(file);VagaSobrando = 0;return 0;
}

public AdmCheck(playerid){new idx = 0;while(idx < sizeof(AdmInfo))
{
if(strcmp(AdmInfo[idx][gMembro],PlayerName(playerid), true ) == 0 )
{
return true;
}idx++;
}
return 0;
}

public AdmsVaga()
{
new storedcopname[64];
new File: file = fopen("BrasilGames/Admins.cfg", io_read);
if (file)
{
new valtmp[MAX_PLAYER_NAME];
while (fread(file, valtmp) > 0){strmid(storedcopname, valtmp, 0, strlen("Vazio"), 255);
if ((strcmp(storedcopname, "Vazio", true, strlen("Vazio")) == 0) && (strlen("Vazio") == strlen(storedcopname)))
{
fclose(file);VagaSobrando = 1;return true;}}}fclose(file);VagaSobrando = 0;
return 0;
}

public SaveAdm()
{
new idx;new File: file2;
while (idx < sizeof(AdmInfo))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%s,%d\n",AdmInfo[idx][gMembro],AdmInfo[idx][AdminVaga]);
if(idx == 0)
{
file2 = fopen("BrasilGames/Admins.cfg", io_write);
}
else
{
file2 = fopen("BrasilGames/Admins.cfg", io_append);
}
fwrite(file2, coordsstring);idx++;fclose(file2);
}
return true;
}

public LoadAdm()
{
new arrCoords[2][64];
new strFromFile2[256];
new File: file = fopen("BrasilGames/Admins.cfg", io_read);
if (file){new idx = 0;
while(idx < sizeof(AdmInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
strmid(AdmInfo[idx][gMembro], arrCoords[0], 0, strlen(arrCoords[0]), 255);
AdmInfo[idx][AdminVaga] = strval(arrCoords[1]);idx++;
}
}
fclose(file);
return true;
}

public SaveHelper()
{
new idx;new File: file2;
while (idx < sizeof(HelperInfo))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%s,%d\n",HelperInfo[idx][hMembro],HelperInfo[idx][HelperVaga]);
if(idx == 0)
{
file2 = fopen("BrasilGames/Helpers.cfg", io_write);
}
else{file2 = fopen("BrasilGames/Helpers.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;fclose(file2);
}
return true;
}

public LoadHelper()
{
new arrCoords[2][64];
new strFromFile2[256];
new File: file = fopen("BrasilGames/Helpers.cfg", io_read);
if (file)
{
new idx = 0;
while(idx < sizeof(HelperInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
strmid(HelperInfo[idx][hMembro], arrCoords[0], 0, strlen(arrCoords[0]), 255);
HelperInfo[idx][HelperVaga] = strval(arrCoords[1]);idx++;
}
}
fclose(file);
return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)