/addhouse
#2

[quote=Pandabeer1337 ]
Hm wassup

pawn Код:
if(strcmp(cmd, "/addhouse", true) == 0)
    {
      tmp = strtok(cmdtext, idx);
      if(!strlen(tmp))
      {
        SendClientMessage(playerid, COLOR_WHITE, "SERVER: Use /addhouse [1-4]");
        return 1;
      }
      if(!IsPlayerAdmin(playerid))
      {
        SendClientMessage(playerid, COLOR_WHITE, "SERVER: Not rcon admin");
            return 1;
      }
      GetPlayerPos(playerid, x, y, z);
      if(strcmp(tmp,"1",true) == 0)
      {
        format(query, 500, "INSERT INTO houses (ex, ey, ez, xx, xy, xz, interior, descr) VALUES (%f,%f,%f,244.5,305.0,999.099975,1,'Besit')", x, y, z);
        }
        else if(strcmp(tmp,"2",true) == 0)
        {
          format(query, 500, "INSERT INTO houses (ex, ey, ez, xx, xy, xz, interior, descr) VALUES (%f, %f, %f,267.100006, 305.0,999.099975,2,'Besit')", x, y, z);
        }
        else if(strcmp(tmp, "3",true) == 0)
        {
          format(query, 500, "INSERT INTO houses (ex, ey, ez, xx, xy, xz, interior, descr) VALUES (%f, %f, %f,301.299987, 306.299987, 1003.5,4,'Besit')", x, y, z);
        }
        else if(strcmp(tmp,"4",true) == 0)
        {
          format(query, 500, "INSERT INTO houses (ex, ey, ez, xx, xy, xz, interior, descr) VALUES (%f, %f, %f,344.299987, 305.2, 999.099975,6,'Besit')", x, y, z);
        }
        else
        {
        SendClientMessage(playerid, COLOR_WHITE, "SERVER: Use /addhouse [1-4]");
        return 1;
        }
      samp_mysql_query(query);
      aHouse = CheckRows("houses");
      format(string, sizeof(string), "SERVER: %d houses in the gamemode right now.", aHouse);
      SendClientMessage(playerid, COLOR_WHITE, string);
        return 1;
    }
Reply


Messages In This Thread
/addhouse - by Think - 06.04.2009, 20:06
Re: /addhouse - by walrus - 06.04.2009, 20:10
Re: /addhouse - by Benjo - 07.04.2009, 03:34

Forum Jump:


Users browsing this thread: 1 Guest(s)