[Ajuda] Comando nao funciona - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Comando nao funciona (
/showthread.php?tid=599637)
Comando nao funciona -
VinnyScript - 28.01.2016
so aparece a msg, player nao conectado, sendo q tenho 3 players on * so um ex *
Код:
CMD:trazer(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, CorErro, "Vocк precisa ser uma Administrador level 1 para usar este comando");
if(pJogando[playerid] == true) return SendClientMessage(playerid, CorErro, "Vocк nгo estб trabalhando!");
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, CorErroNeutro, "USE: /trazer [ID]");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, CorErroNeutro, "O jogador nгo estб conectado");
//
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
//
if(GetPlayerState(ID) != PLAYER_STATE_DRIVER)
{
SetPlayerPos(ID, Pos[0], Pos[1], Pos[2]);
}
else
{
SetVehiclePos(GetPlayerVehicleID(ID), Pos[0], Pos[1], Pos[2]);
}
SetPlayerVirtualWorld(ID, GetPlayerVirtualWorld(playerid));
SetPlayerInterior(ID, GetPlayerInterior(playerid));
//
format(Str, 256, "INFO SERVE: O administrador %s trouxe %s atй ele.", pNomeOriginal[playerid], pNomeOriginal[ID]);
Log("pAdmin/Logs/Trazer.ini", Str);
return 1;
}
Re: Comando nao funciona -
[BOPE]Seu._.Madruga - 28.01.2016
PHP код:
CMD:trazera(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, CorErro, "Vocк precisa ser uma Administrador level 1 para usar este comando");
if(pJogando[playerid] == true) return SendClientMessage(playerid, CorErro, "Vocк nгo estб trabalhando!");
new idplayer, Float:Pos[3], string[124], aname[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME];
if(sscanf(params, "u", idplayer)) return SendClientMessage(playerid, CorErroNeutro, "USE: /trazer [ID]");
if(!IsPlayerConnected(idplayer)) return SendClientMessage(playerid, CorErroNeutro, "O jogador nгo estб conectado");
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
if(GetPlayerState(idplayer) != PLAYER_STATE_DRIVER) SetPlayerPos(idplayer, Pos[0], Pos[1], Pos[2]);
else SetVehiclePos(GetPlayerVehicleID(idplayer), Pos[0], Pos[1], Pos[2]);
SetPlayerVirtualWorld(idplayer, GetPlayerVirtualWorld(playerid));
SetPlayerInterior(idplayer, GetPlayerInterior(playerid));
GetPlayerName(playerid, aname, sizeof(aname));
GetPlayerName(idplayer, pname, sizeof(pname));
format(string, sizeof(string), "INFO SERVE: O administrador %s trouxe %s atй ele.", aname, pname);
Log("pAdmin/Logs/Trazer.ini", string);
return 1;
}