[FilterScript] [FS] C-House - Load, and Save houses through MySQL. Quick and Easy!
#21

Cool script man..
Nice work
Reply
#22

Quote:
Originally Posted by Smokey619
ok what do you mean with the change the DB_Host things and the database i dont get what your saying
Your database information.
Reply
#23


I a having a problem trying to set it so players ca only buy 2 housesmax this is my cde below andthisis the line the errors are on

format(globalquery, sizeof(globalquery) "SELECT * FROM "DB_TABLE_NAME" WHERE Owner = '%s'", name); line 346

Код:
if(!strcmp(cmdtext, "/buyhouse", true)) {
	  new pos = IsPlayerInRangeOfHouse(playerid);
    new name[MAX_PLAYER_NAME];
		if(!strcmp(HouseData[pos][Owner], "Empty House", true)) return GameTextForPlayer(playerid, "~g~OWNED", 3000, 5);
	  if(GetPlayerMoney(playerid) >= HouseData[pos][hPrice]) {
	    GivePlayerMoney(playerid, -HouseData[pos][hPrice]);
	    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
	    strmid(HouseData[pos][Owner], name, 0, MAX_PLAYER_NAME, 255);
			SaveHouse(pos);
      GetPlayerName(playerid, name, MAX_PLAYER_NAME);
			format(globalquery, sizeof(globalquery) "SELECT * FROM "DB_TABLE_NAME" WHERE Owner = '%s'", name);
			mysql_query(globalquery);
			if(mysql_num_rows() >= 2) return GameTextForPlayer(playerid, "You own too many houses!", 5000, 3);
			GameTextForPlayer(playerid, "~g~Welcome to your new house.~n~/~r~/housecommands", 3000, 5);

		}
	  else return GameTextForPlayer(playerid, "~g~YOU CANNOT AFFORD THIS HOUSE.", 3000, 5);
	  return 1;
	}
C:\Users\robmob\Desktop\chouse.pwn(346) : error 001: expected token: ",", but found "-string-"
C:\Users\robmob\Desktop\chouse.pwn(346) : warning 215: expression has no effect
C:\Users\robmob\Desktop\chouse.pwn(346) : warning 215: expression has no effect
C:\Users\robmob\Desktop\chouse.pwn(346) : error 001: expected token: ";", but found ")"
C:\Users\robmob\Desktop\chouse.pwn(346) : error 029: invalid expression, assumed zero
C:\Users\robmob\Desktop\chouse.pwn(346) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#24

Change
pawn Код:
format(globalquery, sizeof(globalquery) "SELECT * FROM "DB_TABLE_NAME" WHERE Owner = '%s'", name);
            mysql_query(globalquery);]
To:
pawn Код:
format(globalquery, sizeof(globalquery), "SELECT * FROM "DB_TABLE_NAME" WHERE Owner = '%s'", name);
            mysql_query(globalquery);
Reply
#25

thanks worked
Reply
#26

i dont know why this does not work for me i have what i need their is no errors or anything but when i load it and i go to my server i enter /housecommands it return me with a that this is not a command i even login as admin and it tells me the same thing
Reply
#27

C:\Users\Billys\Desktop\НЭпт цЬкелпт (\filterscripts\chouse.pwn(67) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Users\Billys\Desktop\НЭпт цЬкелпт (\filterscripts\chouse.pwn(123) : warning 202: number of arguments does not match definition
C:\Users\Billys\Desktop\НЭпт цЬкелпт (\filterscripts\chouse.pwn(202) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.


How to fix that?
Reply
#28

Quote:
Originally Posted by billiout
C:\Users\Billys\Desktop\НЭпт цЬкелпт (\filterscripts\chouse.pwn(67) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Users\Billys\Desktop\НЭпт цЬкелпт (\filterscripts\chouse.pwn(123) : warning 202: number of arguments does not match definition
C:\Users\Billys\Desktop\НЭпт цЬкелпт (\filterscripts\chouse.pwn(202) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.


How to fix that?
IsPlayerInRangeOfPoint is a SA-MP function. Did you do something to the script?
Reply
#29

no anything.
Reply
#30

Quote:
Originally Posted by billiout
no anything.
You just downloaded the script and compiled it, are you sure?
Reply
#31

Any idea how I can change this so it loads the houses through dini, I've tried reading about MySQL, I've got it installed but I just can't get my head around it.
Reply
#32

Quote:
Originally Posted by Y.T
Посмотреть сообщение
Any idea how I can change this so it loads the houses through dini, I've tried reading about MySQL, I've got it installed but I just can't get my head around it.
Theres no point of doing that, I can help you with MySQL if you want? PM me!
Reply
#33

That would be nice, yeah, I'll pm you now.
Reply
#34

is there a stricken kids one to this?
Reply
#35

That can be easily changed if you know the functions.
Reply
#36

Quote:
Originally Posted by Carlton
Посмотреть сообщение
That can be easily changed if you know the functions.
Sorry for the bump, but I really would like it to be Strickenkid's please. I've already tried to change some functions to stricken's, but after trying, my server ended up crashing.
Reply
#37

nice its work i have maked house and done
Reply
#38

a question: wheres that sample house you wrote ?

Example
- I've given you a example in the script.
pawn Code:

AddServerHouse(1, 1984.19,-1995.43,16.3322, 9, 315.856170,1024.496459,1949.797363, 9000);

PS:

can somebody make me an example house with these coordinates:

AddPlayerClass(265,2014.4633,948.0726,10.8203,269. 7458,0,0,0,0,0,0); // haus2

i really dont know how to do that

thanks a lot
Reply
#39

C:\Users\Pontus\Desktop\Sa-Mp-Server\filterscripts\chouse.pwn(52) : error 001: expected token: ";", but found "enum"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


How can i fix this? Help please
Reply
#40

download link?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)