toribio

toribio

Oct 31st, 2008
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.89 KB | None | 0 0
  1. if(!strcmp(cmd, "/setarcasa", true))
  2. {
  3.     if(Profissao[playerid] == CORRETOR || IsPlayerAdmin(playerid)
  4.     {
  5.         new tmp[256];
  6.         tmp = strtok(cmdtext, idx);
  7.         if(!strlen(tmp))return SendClientMessage(playerid, COLOR_RED, "/setarcasa [nick]");
  8.         if(!udb_Exists(tmp)) //coloquei um "!" ali, ai ele verifica se a casa N�O existe
  9.         {
  10.             new Float:X, Float:Y, Float:Z;
  11.             GetPlayerPos(playerid, X, Y, Z);
  12.             //se n�o funcionar, descomente a linha abaixo:
  13.             //udb_create(tmp); //� algo assim, se o compilador n�o reconhecer a fun��o, ache como ela � pra criar o arquivo
  14.             udb_setPosition(tmp, X, Y, Z);
  15.             udb_setAng(tmp, 0);
  16.             SendClientMessage(playerid, COLOR_GREEN, "Casa salva.");
  17.         }
  18.     } else {
  19.         SendClientMessage(playerid, COLOR_RED, "Voc� n�o � um corretor!");
  20.     return 1;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment