I need help with house systhem!
#1

Hey! i have problems with house systhem! - By Antironix
Код:
stock GetHouseStats(playerid, hid)
{
	new str2[256];
	format(str2, sizeof(str2), "Owned by: %s", hInfo[hid][Name]);
	GameTextForPlayer(playerid, c_y, str2, 3000, 4); // Error Line because i want to change SendClientMessage to Game Text for player!
	if(strcmp(hInfo[hid][Renter],"ForRent",true))
	{
		format(str2, sizeof(str2), "Rented by: %s", hInfo[hid][Renter]);
		SendClientMessage(playerid, c_y, str2);
	}
	format(str2,sizeof(str2),"Cost: %i",hInfo[hid][Cost]);
	SendClientMessage(playerid, c_y, str2);
}
and i have these erors:
Код:
error 035: argument type mismatch (argument 2)
Reply
#2

What exact line are you getting those errors?
Reply
#3

Why u didnt read all of it!?
i have added :
Код:
 GameTextForPlayer(playerid, c_y, str2, 3000, 4); // Error Line because i want to change SendClientMessage to Game Text for player!
Reply
#4

If you read: https://sampwiki.blast.hk/wiki/GameTextForPlayer - You will see that you can only use:
pawn Код:
GameTextForPlayer(playerid, string, 3000, 4);
Remove the c_y
Reply
#5

but there will be some params lost?
Reply
#6

What is the c_y meant to do? Colour?
Reply
#7

idk.... it was automaticly... im just trying to script it...
Reply
#8

Well when you are using GameTextForPlayer you only need the following:
pawn Код:
(playerid, const string[], time, style)
This is how it should look:
pawn Код:
GameTextForPlayer(playerid, str2, 3000, 4);
if you want to change the colour then:
pawn Код:
format(str2, sizeof(str2), "~B~Owned by: %s", hInfo[hid][Name]);
"~B~" will show the text as blue
Reply
#9

im not a scripting n00b i knew that long time ago!!!!
but i dont know almost nothing about this script!
Reply
#10

Right, sorry I was just making sure you would understand
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)