CreateBarres criar uma barreira
DeleteAllBarres deleta todas as barreiras
CreateStrip criar um barreira no chгo de espinhos
DeleteAllStrip deleta todas as barreiras de espinhos
#include <a_samp>
#include <Barres>
#define Cor_Barreira  0x009493FF
#define Cor_BarreiraToAll 0xEDA838FF
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
public OnPlayerCommandText(playerid, cmdtext[])
{
 new cmd[256];
 if (strcmp(cmd,"/br",true) == 0)
  {
   new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
  GetPlayerPos(playerid, plocx, plocy, plocz);
  GetPlayerFacingAngle(playerid,ploca);
  CreateStrip(plocx,plocy,plocz,ploca);
  SendClientMessage(playerid, Cor_Barreira, "Vocк colocou uma barreira de espinhos.");
  SendClientMessage(playerid, Cor_Barreira, "Para remover (/rbr).");
  SendClientMessage(playerid, Cor_Barreira, "(/rbr) removerar todas as barreiras de espinhos.");
  new string[128];
  new pName[MAX_PLAYER_NAME];
  GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  format(string,sizeof string,"%s Colocou uma barreira de espinhos!",pName);
  SendClientMessageToAll(Cor_BarreiraToAll,string);
  return 1;
  }
  else if (strcmp(cmd,"/rbr",true) == 0)
  {
  DeleteAllStrip();
  SendClientMessage(playerid, Cor_Barreira, "Vocк removeu todas as barreiras de espinhos.");
  new string[128];
  new pName[MAX_PLAYER_NAME];
  GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  format(string,sizeof string,"%s Retirou todas as barreiras de espinhos!",pName);
  SendClientMessageToAll(Cor_BarreiraToAll,string);
  return 1;
  }
 if (strcmp(cmd,"/br2",true) == 0)
  {
   new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
  GetPlayerPos(playerid, plocx, plocy, plocz);
  GetPlayerFacingAngle(playerid,ploca);
  CreateBarres(plocx,plocy,plocz,ploca);
  SetPlayerPos(playerid, plocx, plocy, plocz+4);
  SendClientMessage(playerid, Cor_Barreira, "Vocк colocou uma barreira.");
  SendClientMessage(playerid, Cor_Barreira, "Para remover (/rbr2).");
  SendClientMessage(playerid, Cor_Barreira, "(/rbr2) removerar todas as barreira.");
  new string[128];
  new pName[MAX_PLAYER_NAME];
  GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  format(string,sizeof string,"%s Colocou uma barreira!",pName);
  SendClientMessageToAll(Cor_BarreiraToAll,string);
  return 1;
  }
  else if (strcmp(cmd,"/rbr2",true) == 0)
  {
  DeleteAllBarres();
  SendClientMessage(playerid, Cor_Barreira, "Vocк removeu todas as barreiras.");
  new string[128];
  new pName[MAX_PLAYER_NAME];
  GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  format(string,sizeof string,"%s Retirou todas as barreiras!",pName);
  SendClientMessageToAll(Cor_BarreiraToAll,string);
  return 1;
  }
 else if (strcmp(cmd,"/rtbr",true) == 0)
  {
  DeleteAllBarres();
  DeleteAllStrip();
  SendClientMessage(playerid, Cor_Barreira, "Vocк removeu todas as barreiras, e barreiras de espinhos!.");
  new string[128];
  new pName[MAX_PLAYER_NAME];
  GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  format(string,sizeof string,"%s Retirou todas as barreiras, e barreiras de espinhos!",pName);
  SendClientMessageToAll(Cor_BarreiraToAll,string);
  return 1;
 }
 return 0;
}
Originally Posted by DraKoNeoN
|
Originally Posted by russooooo
Uma INC com comandos... Hmm.
Altera isso para FS, e jб agora parabйns! |
Originally Posted by SuB_ZeRo0_
Quote:
|
Compilando new.pwn... C:\Documents and Settings\User\Desktop\serverbrasilrp^^\ServerBrasilrp\pawno\new.pwn(2) : fatal error 100: cannot read from file: "Barres" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
#include <a_samp> #include <Barres> #define Cor_Barreira 0x009493FF #define Cor_BarreiraToAll 0xEDA838FF #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 new <Barres> public OnPlayerCommandText(playerid, cmdtext[])