if(strcmp(cmd, "/rp", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
}
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "{0099FF}(~){CCCCFF}Use: /rp [playerid]!");
return 1;
}
plid = strval(tmp);
if(IsPlayerConnected(plid)){
new vid;
vid = GetPlayerVehicleID(plid);
SetVehicleToRespawn(vid);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{0099FF}(~)AdmCmd(~) - {CCCCFF} %s (%d) deu respawn no seu carro !", aname,playerid);
SendClientMessage(plid,outraadm, string);
SendClientMessage(playerid, Verde, "{0099FF}(~){CCCCFF} Comando efetuado com sucesso!");
return 1;
}else{
SendClientMessage(playerid, Vermelho, "{0099FF}[x]{CCCCFF} ID invбlido");
}
return 1;
}
if(strcmp(cmd, "/trazert", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{0099FF}(~)AdmCmd(~) - {CCCCFF} %s (%d) trouxe todos para sua posiзгo.", aname,playerid);
SendClientMessageToAll(outraadm, string);
for(new i=0;i<MAX_PLAYERS;i++){
format(file, sizeof(file), P_CONTAS, aname);
if(pAdmin[playerid] > 2){
if(IsPlayerConnected(i)){
new interiormeu;
interiormeu = GetPlayerInterior(playerid);
SetPlayerInterior(i, interiormeu);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(i, X, Y, Z);
}
}
}
return 1;
}
if(strcmp(cmd, "/trazert", true) == 0) {
{
if(Admin[playerid] > 1)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{0099FF}(~)AdmCmd(~) - {CCCCFF} %s (%d) trouxe todos para sua posiзгo.", aname,playerid);
SendClientMessageToAll(outraadm, string);
for(new i=0;i<MAX_PLAYERS;i++){
format(file, sizeof(file), P_CONTAS, aname);
if(IsPlayerConnected(i)){
new interiormeu;
interiormeu = GetPlayerInterior(playerid);
SetPlayerInterior(i, interiormeu);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(i, X, Y, Z);
}
}
}
return 1;
}
if(strcmp(cmd, "/rp", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
if(pAdmin[playerid] >=1)
{
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "{0099FF}(~){CCCCFF}Use: /rp [playerid]!");
return 1;
}
else return SendClientMessage(playerid, -1, "Sem authorizaзгo");
plid = strval(tmp);
if(IsPlayerConnected(plid))
{
new vid;
vid = GetPlayerVehicleID(plid);
SetVehicleToRespawn(vid);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{0099FF}(~)AdmCmd(~) - {CCCCFF} %s (%d) deu respawn no seu carro !", aname,playerid);
SendClientMessage(plid,outraadm, string);
SendClientMessage(playerid, Verde, "{0099FF}(~){CCCCFF} Comando efetuado com sucesso!");
return 1;
}
else SendClientMessage(playerid, Vermelho, "{0099FF}[x]{CCCCFF} ID invбlido");
return 1;
}
if(strcmp(cmd, "/trazert", true) == 0)
{
if(pAdmin[playerid] < 3) return SendClientMessage(playerid, -1, "sem authorizaзгo");
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{0099FF}(~)AdmCmd(~) - {CCCCFF} %s (%d) trouxe todos para sua posiзгo.", aname,playerid);
SendClientMessageToAll(outraadm, string);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
new interiormeu;
interiormeu = GetPlayerInterior(playerid);
SetPlayerInterior(i, interiormeu);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(i, X, Y, Z);
}
}
return 1;
}
Eu sinceramente nгo sei como que esses caras conseguem se nortear nesses comandos de strcmp sem sequer indentaзгo.
|
Eu sinceramente nгo sei como que esses caras conseguem se nortear nesses comandos de strcmp sem sequer indentaзгo.
|
if(pAdmin[playerid] > 1){
}
nem ele sabe, o codigo tava cheio de { e } sem utilidade pq a porra toda mal identada n dava pra saber onde abria e onde fexava por exemplo
pawn Код:
|
if(strcmp(cmd, "/rp", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
if(pAdmin[playerid] >=1)
{
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "{0099FF}(~){CCCCFF}Use: /rp [playerid]!");
return 1;
}
else return SendClientMessage(playerid, -1, "Sem authorizaзгo");
plid = strval(tmp);
if(IsPlayerConnected(plid))
{
new vid;
vid = GetPlayerVehicleID(plid);
SetVehicleToRespawn(vid);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{0099FF}(~)AdmCmd(~) - {CCCCFF} %s (%d) deu respawn no seu carro !", aname,playerid);
SendClientMessage(plid,outraadm, string);
SendClientMessage(playerid, Verde, "{0099FF}(~){CCCCFF} Comando efetuado com sucesso!");
return 1;
}
else SendClientMessage(playerid, Vermelho, "{0099FF}[x]{CCCCFF} ID invбlido");
return 1;
}
if(strcmp(cmd, "/rp", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
if(pAdmin[playerid] >=1)
{
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, Vermelho, "{0099FF}(~){CCCCFF}Use: /rp [playerid]!");
}
else return SendClientMessage(playerid, -1, "Sem authorizaзгo");
plid = strval(tmp);
if(IsPlayerConnected(plid))
{
new vid;
vid = GetPlayerVehicleID(plid);
SetVehicleToRespawn(vid);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{0099FF}(~)AdmCmd(~) - {CCCCFF} %s (%d) deu respawn no seu carro !", aname,playerid);
SendClientMessage(plid,outraadm, string);
SendClientMessage(playerid, Verde, "{0099FF}(~){CCCCFF} Comando efetuado com sucesso!");
return 1;
}
else SendClientMessage(playerid, Vermelho, "{0099FF}[x]{CCCCFF} ID invбlido");
return 1;
}
pawn Код:
|
C:\Users\Vitor\Desktop\Servidor\gamemodes\GM.pwn(6822) : warning 203: symbol is never used: "plid"
C:\Users\Vitor\Desktop\Servidor\gamemodes\GM.pwn(6827) : error 017: undefined symbol "plid"
C:\Users\Vitor\Desktop\Servidor\gamemodes\GM.pwn(6827) : error 017: undefined symbol "tmp"
C:\Users\Vitor\Desktop\Servidor\gamemodes\GM.pwn(6828) : error 017: undefined symbol "plid"
C:\Users\Vitor\Desktop\Servidor\gamemodes\GM.pwn(6831) : error 017: undefined symbol "plid"
C:\Users\Vitor\Desktop\Servidor\gamemodes\GM.pwn(6834) : error 017: undefined symbol "plid"
C:\Users\Vitor\Desktop\Servidor\gamemodes\GM.pwn(6836) : error 017: undefined symbol "plid"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
if(strcmp(cmd, "/rp", true) == 0)
{
new aname[MAX_PLAYER_NAME];
new tmp[128];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
if(pAdmin[playerid] < 1) return SendClientMessage(playerid, -1, "Sem authorizaзгo");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, Vermelho, "{0099FF}(~){CCCCFF}Use: /rp [playerid]!");
new plid = strval(tmp);
if(IsPlayerConnected(plid))
{
new vid;
vid = GetPlayerVehicleID(plid);
SetVehicleToRespawn(vid);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{0099FF}(~)AdmCmd(~) - {CCCCFF} %s (%d) deu respawn no seu carro !", aname,playerid);
SendClientMessage(plid,outraadm, string);
SendClientMessage(playerid, Verde, "{0099FF}(~){CCCCFF} Comando efetuado com sucesso!");
return 1;
}
else SendClientMessage(playerid, Vermelho, "{0099FF}[x]{CCCCFF} ID invбlido");
return 1;
}