cmd:gotoh error help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: cmd:gotoh error help (
/showthread.php?tid=508950)
cmd:gotoh error help -
KillerStrike23 - 24.04.2014
hey guys I gotta this problem with the cmd gotoh or gotohome
pawn Код:
CMD:gotoh(playerid,params[]){
if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment!");
new str1[256],pname[24],str[256];
GetPlayerName(playerid, pname, sizeof(pname));
format(str1, sizeof(str1), "ladmin/users/%s.sav", udb_encode(pname));
if (dini_Exists(str1)){
if(dini_Int(str1,"Houseid")!=-255){
TeleTimer = SetTimerEx("ttimer", 1000, true, "i",playerid);
tseconds[playerid] = 6;
format(tstring,45,"You Must wait %d seconds before teleporting", tseconds[playerid]-1);
if(PlayerInfo[playerid][Level] == 0) SendClientMessage(playerid,COLOR_LIGHTBLUE, tstring);
vCount[playerid] = 1;
Tx[playerid] = dini_Float(str1,"SpawnX");
Ty[playerid] = dini_Float(str1,"SpawnY");
Tz[playerid] = dini_Float(str1,"SpawnZ");
Ti[playerid] = strval(str);
format(telestring,43,"Welcome Home Baby!");}}
else return SendClientMessage(playerid, red, "ERROR:You Should Have A House First To Teleport To It");
return 1;}
the problem is the error ERROR:You Should Have A House First To Teleport To It, don't appear to players who don't have a house why ?
Re: cmd:gotoh error help -
KillerStrike23 - 24.04.2014
bump
Re: cmd:gotoh error help -
Galletziz - 24.04.2014
pawn Код:
else
{
return SendClientMessage(playerid, red, "ERROR:You Should Have A House First To Teleport To It");
}
return 1;
}
Re: cmd:gotoh error help -
KillerStrike23 - 24.04.2014
thanks it worked perfectly +rep
Re: cmd:gotoh error help -
JeaSon - 24.04.2014
try this
pawn Код:
CMD:gotoh(playerid,params[])
{
if(PlayerInfo[playerid][Jailed] == 1)
{
return SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment!");
}
new str1[256],pname[24],str[256];
GetPlayerName(playerid, pname, sizeof(pname));
format(str1, sizeof(str1), "ladmin/users/%s.sav", udb_encode(pname));
if (dini_Exists(str1))
{
if(dini_Int(str1,"Houseid")!=-255)
{
TeleTimer = SetTimerEx("ttimer", 1000, true, "i",playerid);
tseconds[playerid] = 6;
format(tstring,45,"You Must wait %d seconds before teleporting", tseconds[playerid]-1);
if(PlayerInfo[playerid][Level] == 0) SendClientMessage(playerid,COLOR_LIGHTBLUE, tstring);
vCount[playerid] = 1;
Tx[playerid] = dini_Float(str1,"SpawnX");
Ty[playerid] = dini_Float(str1,"SpawnY");
Tz[playerid] = dini_Float(str1,"SpawnZ");
Ti[playerid] = strval(str);
format(telestring,43,"Welcome Home Baby!");
}
else
{
SendClientMessage(playerid, red, "ERROR:You Should Have A House First To Teleport To It");
}
}
return 1;
}