if(strcmp(cmd, "/congelar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
MSGPLAYER(playerid, COLOR_GRAD2, "USE: /congelar [id]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 10 && PlayerInfo[playerid][pAdmin] != 9)
{
MSGPLAYER(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/TRABALHAR)");
return 1;
}
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
if(PlayerInfo[playa][pAdmin] >= 10 && PlayerInfo[playerid][pAdmin] < 9)
{
MSGPLAYER(playerid, COLOR_GRAD1, "Vocк nгo pode congelar um Admin Dono !");
return 1;
}
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
Controle(playa, 0);
format(string, sizeof(string), "(AdmCmd): %s Congelou %s",sendername, giveplayer);
printf("%s",string);
if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
{
format(string, sizeof(string), "(AdmCmd): %s Foi congelado por ",giveplayer);
}
else
{
format(string, sizeof(string), "(AdmCmd): %s Foi congelado por %s",giveplayer ,sendername);
}
ABroadCast(COLOR_LIGHTRED,string,1);
}
}
}
else
{
MSGPLAYER(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!");
}
}
return 1;
}
if(strcmp(cmd, "/ir", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
MSGPLAYER(playerid, COLOR_GRAD2, "USE: /ir [id]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo, world;
plo = ReturnUser(tmp);
world = GetPlayerVirtualWorld(plo);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
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[plo][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); LinkVehicleToInterior(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
SetPlayerVirtualWorld(playerid, world);
MSGPLAYER(playerid, 0x33FF00FF, "Vocк foi teleportado pelo Admin !");
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
GetPlayerName(plo, plname, MAX_PLAYER_NAME);
if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
{}
else { format(string, sizeof(string), "O Admin %s Foi Atй %s.",playername,plname); }
ProxDetector(30.0, playerid, string, 0x33FF00FF,0x33FF00FF,0x33FF00FF,0x33FF00FF,0x33FF00FF);
}
}
}
else
{
MSGPLAYER(playerid, COLOR_GRAD1, " Esse nгo й um player ativo.");
}
}
return 1;
}
if(strcmp(cmd, "/cnn", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 10 && PlayerInfo[playerid][pAdmin] != 9)
{
MSGPLAYER(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/pa)");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
MSGPLAYER(playerid, COLOR_GRAD2, "USE: /cnn [cnn formato ~n~=NovaLinha ~r~=Vermelho ~g~=Verde ~b~=Azul ~w~=Branco ~y~=Amarelo ~l~=Preto]");
return 1;
}
if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
{
format(string, sizeof(string), "~b~: ~w~%s",result);
}
else
{
format(string, sizeof(string), "~b~%s: ~w~%s",sendername,result);
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GameTextForPlayer(i, string, 5000, 3);
}
}
return 1;
}
else
{
MSGPLAYER(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando!");
return 1;
}
}
return 1;
}
C:\Documents and Settings\Jaden-\Desktop\SAMP\Fas Drift 0.3d\gamemodes\FasDW2.pwn(480) : error 017: undefined symbol "cmd"
C:\Documents and Settings\Jaden-\Desktop\SAMP\Fas Drift 0.3d\gamemodes\FasDW2.pwn(484) : error 017: undefined symbol "tmp"
C:\Documents and Settings\Jaden-\Desktop\SAMP\Fas Drift 0.3d\gamemodes\FasDW2.pwn(484) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Jaden-\Desktop\SAMP\Fas Drift 0.3d\gamemodes\FasDW2.pwn(485) : error 017: undefined symbol "tmp"
C:\Documents and Settings\Jaden-\Desktop\SAMP\Fas Drift 0.3d\gamemodes\FasDW2.pwn(487) : error 017: undefined symbol "MSGPLAYER"
C:\Documents and Settings\Jaden-\Desktop\SAMP\Fas Drift 0.3d\gamemodes\FasDW2.pwn(491) : error 017: undefined symbol "ReturnUser"
C:\Documents and Settings\Jaden-\Desktop\SAMP\Fas Drift 0.3d\gamemodes\FasDW2.pwn(492) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\Jaden-\Desktop\SAMP\Fas Drift 0.3d\gamemodes\FasDW2.pwn(492) : warning 215: expression has no effect
C:\Documents and Settings\Jaden-\Desktop\SAMP\Fas Drift 0.3d\gamemodes\FasDW2.pwn(492) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Jaden-\Desktop\SAMP\Fas Drift 0.3d\gamemodes\FasDW2.pwn(492) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Jaden-\Desktop\SAMP\Fas Drift 0.3d\gamemodes\FasDW2.pwn(492) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
10 Errors.
Erro
![]() pawn Код:
|
Ajusta para o teu GM
error 017: undefined symbol "cmd" Tenta por no lugar de cmd = cmdtext error 017: undefined symbol "MSGPLAYER" No lugar de MSGPLAYER = SendClientMessage e assim por diante |
CMD:ir(playerid, params[])
{
new ID;
new String[128];
if(sscanf(params, "u", ID))
{
SendClientMessage(playerid, -1, "Use /ir [ID]");
return 0;
}
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "[ERRO] ID invalido");
new Float:Pos[3];
GetPlayerPos(ID, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0]+2, Pos[1]+2, Pos[2]+2);
format(String, sizeof(String), "O Admin %s veio atй vocк!", Nome(playerid));
SendClientMessage(ID, -1, String);
format(String, sizeof(String), "Vocк foi atй o Jogador %s [ID: %d]", Nome(ID), ID);
SendClientMessage(playerid, -1, String);
return 1;
}
stock Nome(playerid)
{
new pnome[24];
GetPlayerName(playerid, pnome, 24);
return pnome;
}