//Onplayercommandtext
if(strcmp(cmd, "/ir", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /ir [playerid/Parte-do-Nick]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
new nome[24];
GetPlayerName(playerid, nome, sizeof nome);
if(PlayerInfo[playerid][pAdmin] >= /* LEVEL DE ADM*/ || strfind(nome, ADMPLAYER, true) == 0 || strfind(nome, ADMPLAYER2, true) == 0)
{
if(Spectate[playerid] != 255)
{
Spectate[playerid] = 256;
}
GetPlayerPos(plo, plocx, plocy, plocz);
if(PlayerInfo[plo][pInt] > 0)
{
SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(playerid,0);
}
if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) in sa = 526.8
{
SetPlayerInterior(playerid,1);
PlayerInfo[playerid][pInt] = 1;
}
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
GetPlayerName(plo, giveplayer,256);
GetPlayerName(playerid, sendername,256);
format(string, sizeof(string), "[Info] Vocк teleportou atй %s.", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "[Info] O admin %s, teleportou atй vocк.", sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando!");
}
}
}
else
{
format(string, sizeof(string), " %d nгo й um player ativo.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
if(strcmp(cmd, "/trazer", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /trazer [playerid/Parte-do-Nick]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if (PlayerInfo[playerid][pAdmin] >= /* LEVEL ADM */ || AdminDuty[playerid] == 1)
{
GetPlayerPos(playerid, plocx, plocy, plocz);
if(PlayerInfo[playerid][pInt] > 0)
{
SetPlayerInterior(plo,PlayerInfo[playerid][pInt]);
PlayerInfo[plo][pInt] = PlayerInfo[playerid][pInt];
PlayerInfo[plo][pLocal] = PlayerInfo[playerid][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(plo,0);
}
if(plocz > 930.0 && PlayerInfo[playerid][pInt] == 0) //the highest land point in sa = 526.8
{
SetPlayerInterior(plo,1);
PlayerInfo[plo][pInt] = 1;
}
if (GetPlayerState(plo) == 2)
{
TelePos[plo][0] = 0.0;
TelePos[plo][1] = 0.0;
new tmpcar = GetPlayerVehicleID(plo);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(plo,plocx,plocy+2, plocz);
}
GetPlayerName(plo, giveplayer,256);
GetPlayerName(playerid, sendername,256);
format(string, sizeof(string), "[Info] Vocк teleportou %s atй vocк.", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "[Info] O admin %s te trouxe atй ele. !", sendername);
SendClientMessage(plo, COLOR_WHITE, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode usar esse comando!");
}
}
}
else
{
format(string, sizeof(string), " %d is not an active player.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
if(strcmp(cmd, "/ir", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0x33FF00FF, "USE: /ir [ id ]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if (IsPlayerAdmin(playerid))//Troque pelo seu sistema de admin coloquei aqui logado RCON
{
if(Spectate[playerid] != 255)
{
Spectate[playerid] = 256;
}
GetPlayerPos(plo, plocx, plocy, plocz);
if(PlayerInfo[plo][pInt] > 0)
{
SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(playerid,0);
}
if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8
{
SetPlayerInterior(playerid,1);
PlayerInfo[playerid][pInt] = 1;
}
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
SendClientMessage(playerid, 0x33FF00FF, "Voce foi teleportado pelo Admin !");
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(plo));
SetPVarInt(playerid, "Universo", GetPVarInt(plo, "Universo"));
GetPlayerName(plo, plname, MAX_PLAYER_NAME);
format(string, sizeof(string), "O Admin %s Foi Atй %s.",playername,plname);
SendClientMessage(playerid, 0x33FF00FF, string);
SendClientMessage(plo, 0x33FF00FF, string);
}
else
{
SendClientMessage(playerid, 0x33FF00FF, " Voce nгo esta autorizado a usar este comando!");
}
}
}
else
{
format(string, sizeof(string), " %d is not an active player.", plo);
SendClientMessage(playerid, 0x33FF00FF, string);
}
}
return 1;
}
if(strcmp(cmd, "/trazer", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0x33FF00FF, "USE: /trazer [ id ]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
/*if (PlayerInfo[plo][pAdmin] > 6)
{
SendClientMessage(playerid, 0x33FF00FF, "Trouxe o jogador atй vocк.");
return 1;
}*/ //Seria para nгo dar para puxar admin
if (IsPlayerAdmin(playerid))//Troque pelo seu sistema de admin coloquei aqui logado RCON
{
GetPlayerPos(playerid, plocx, plocy, plocz);
if(PlayerInfo[playerid][pInt] > 0)
{
SetPlayerInterior(plo,PlayerInfo[playerid][pInt]);
PlayerInfo[plo][pInt] = PlayerInfo[playerid][pInt];
PlayerInfo[plo][pLocal] = PlayerInfo[playerid][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(plo,0);
}
if(plocz > 930.0 && PlayerInfo[playerid][pInt] == 0) //the highest land point in sa = 526.8
{
SetPlayerInterior(plo,1);
PlayerInfo[plo][pInt] = 1;
}
if (GetPlayerState(plo) == 2)
{
TelePos[plo][0] = 0.0;
TelePos[plo][1] = 0.0;
new tmpcar = GetPlayerVehicleID(plo);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(plo,plocx,plocy+2, plocz);
}
SetPlayerVirtualWorld(plo, GetPlayerVirtualWorld(playerid));
SetPVarInt(plo, "Universo", GetPVarInt(playerid, "Universo"));
SendClientMessage(plo, 0x33FF00FF, "Vocк foi teleportado pelo Admin !");
}
else
{
SendClientMessage(playerid, 0x33FF00FF, " Vocк nгo esta autorizado a usar este comando!");
}
}
}
else
{
format(string, sizeof(string), " %d Nгo й um jogador ativo.", plo);
SendClientMessage(playerid, 0x33FF00FF, string);
}
}
return 1;
}
|
C:\Users\Gui\Documents\Meus arquivos recebidos\BRASIL STAR JOGOS RPG\BRASIL STAR JOGOS RPG\gamemodes\VLC.pwn(20714) : error 017: undefined symbol "plname" C:\Users\Gui\Documents\Meus arquivos recebidos\BRASIL STAR JOGOS RPG\BRASIL STAR JOGOS RPG\gamemodes\VLC.pwn(20715) : error 017: undefined symbol "plname" |
if(strcmp(cmd, "/ir", true) == 0)
{
#define Branco 0xFFFFFF
tmp = strtok(cmdtext, idx);
new Float:X, Float:Y, Float:Z, string[90], PlayerB;
if(!strlen(tmp)) return SendClientMessage(playerid, vermelho, "Uso correto:{FFFFFF} /Ir [id]");
PlayerB = strval(tmp);
if(!IsPlayerConnected(PlayerB)) return SendClientMessage(playerid, Branco, "Este jogador nгo estб online");
GetPlayerPos(PlayerB, X, Y, Z);
SetPlayerPos(playerid, X, Y+1, Z);
if(GetPlayerState(playerid) == 2)
{
new carro = GetPlayerVehicleID(playerid);
SetVehiclePos(carro, X, Y+1, Z);
PutPlayerInVehicle(playerid, carro, 0);
}
format(string, sizeof(string), "Vocк foi atй {E31919}%s.", pNome(PlayerB));
SendClientMessage(playerid, Branco, string);
format(string, sizeof(string), "O Admin {E31919}%s{FFFFFF} foi atй vocк.", pNome(playerid));
SendClientMessage(PlayerB, Branco, string);
return 1;
}
if(strcmp(cmd, "/trazer", true) == 0)
{
#define Branco 0xFFFFFFFF
tmp = strtok(cmdtext, idx);
new PlayerB, string[75], Float:X, Float:Y, Float:Z;
if(!strlen(tmp)) return SendClientMessage(playerid, vermelho, "Uso correto:{FFFFFF} /Trazer [id]");
PlayerB = strval(tmp);
if(!IsPlayerConnected(PlayerB)) return SendClientMessage(playerid, Branco, "Este jogador nгo estб conectado");
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(PlayerB, X, Y, Z);
if(GetPlayerState(playerid) == 2)
{
new carro = GetPlayerVehicleID(playerid);
SetVehiclePos(carro, X, Y+1, Z);
PutPlayerInVehicle(playerid, carro, 0);
}
format(string, sizeof(string), "Vocк trouxe {E31919}%s{FFFFFF} atй vocк.", pNome(PlayerB));
SendClientMessage(playerid, Branco, string);
format(string, sizeof(string), "O Admin {E31919}%s{FFFFFF} te trouxe atй ele.", pNome(playerid));
SendClientMessage(PlayerB, Branco, string);
return 1;
}

|
@Gabriel Duarte
seu cуdigo estб dando os seguintes erros: Код:
C:\Users\Gui\Documents\Meus arquivos recebidos\BRASIL STAR JOGOS RPG\BRASIL STAR JOGOS RPG\gamemodes\VLC.pwn(20714) : error 017: undefined symbol "plname" C:\Users\Gui\Documents\Meus arquivos recebidos\BRASIL STAR JOGOS RPG\BRASIL STAR JOGOS RPG\gamemodes\VLC.pwn(20715) : error 017: undefined symbol "plname" |
new plname[MAX_PLAYER_NAME];
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(1) : error 017: undefined symbol "MAX_PLAYER_NAME"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(90) : warning 217: loose indentation
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(90) : error 017: undefined symbol "cmd"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(93) : error 017: undefined symbol "tmp"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(93) : error 017: undefined symbol "strtok"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(95) : error 017: undefined symbol "tmp"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(95) : error 017: undefined symbol "vermelho"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(96) : error 017: undefined symbol "tmp"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(106) : error 017: undefined symbol "pNome"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(108) : error 017: undefined symbol "pNome"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(115) : warning 217: loose indentation
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(115) : error 017: undefined symbol "cmd"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(117) : warning 201: redefinition of constant/macro (symbol "Branco")
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(118) : error 017: undefined symbol "tmp"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(118) : error 017: undefined symbol "strtok"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(120) : error 017: undefined symbol "tmp"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(120) : error 017: undefined symbol "vermelho"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(121) : error 017: undefined symbol "tmp"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(131) : error 017: undefined symbol "pNome"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(133) : error 017: undefined symbol "pNome"
C:\Users\Sergio\Desktop\Server\gamemodes\GM.pwn(323) : warning 203: symbol is never used: "plname"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
17 Errors.