[Help] With teleporting & dini
#1

Hello,

I'm trying to make buyable houses for my server. But when i make the enter command i only can telepot to the first house. Even when my house == 3 in my dinifile.

Do someone know what i'm doing wrong?

Here is my command:

COMMAND:enter(playerid, params[])
{
new playerfile[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(playerfile, sizeof(playerfile), "Premium/Users/%s.ini",pname);
if(house[playerid] == 1)
{
SetPlayerPos(playerid,2216.1282, -1076.3052, 1050.4844);
SetPlayerFacingAngle(playerid, 90);
SetPlayerInterior(playerid,1);
SetCameraBehindPlayer(playerid);
}
if(house[playerid] == 2)
{
SetPlayerPos(playerid,2365.1089, -1133.0795, 1050.875);
SetPlayerFacingAngle(playerid, 180);
SetPlayerInterior(playerid,;
SetCameraBehindPlayer(playerid);
}
if(house[playerid] == 3)
{
SetPlayerPos(playerid,2323.7063, -1147.6509, 1050.7101);
SetPlayerFacingAngle(playerid, 180);
SetPlayerInterior(playerid,12);
SetCameraBehindPlayer(playerid);
}
return 1;
}


Thanks,

Lil G
Reply
#2

Someone?
Reply
#3

well, how do you know that house[playerid] equls 3? is this variable set??

//edit: you're setting playerfile variable with string: Premium/Users/%s.ini but you're not using this variable. Why?
Reply
#4

I'm not exactly sure what you mean, the variable 1, 2 or 3 are the kind of houses the player has bought. in the string 'Premium/Users/%s.ini' it first searches the name of the player, and then what kind of house that player has bought, and then enters the house of that person.

the problem is, that when a player has bought house 2 or 3, it still only enters house 1. do you have any idea what I'm doing wrong and how can this be fixed?

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)