Help /safehouse - 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: Help /safehouse (
/showthread.php?tid=393156)
Help /safehouse -
Freak@ - 17.11.2012
Wanted your help to fix my command / safe for the player to use the command in your home, but the error and giving ta to use this command inside the houses of other players.
pawn Code:
if(strcmp(cmd,"/safehouse",true)==0)
{
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if (!PlayerToPoint(3, playerid,HouseInfo[playerid][hExitx], HouseInfo[playerid][hExity], HouseInfo[playerid][hExitz]))
{
SendClientMessage(playerid, COLOR_GREY, "You are not inside your home.");
return 1;
}
ShowPlayerDialog(playerid,1144,DIALOG_STYLE_LIST,"Safe House","Deposit\nBooty\nBalance","okay","cancel");
return 1;
}
}
Re: Help / safehouse -
Lean - 17.11.2012
Wwhat ?
Re: Help /safehouse -
Freak@ - 17.11.2012
I want to fix the command to the player using it only within your home, but giving him use ta ne homes of other players.
Re: Help /safehouse -
Freak@ - 17.11.2012
I would be very grateful if someone helps me, I need the code urgently.
Re: Help /safehouse -
Freak@ - 17.11.2012
Wanted your help to fix my command / safe for the player to use the command in your home, but the error and giving ta to use this command inside the houses of other players.
pawn Code:
if(strcmp(cmd,"/safehouse",true)==0)
{
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if (!PlayerToPoint(3, playerid,HouseInfo[playerid][hExitx], HouseInfo[playerid][hExity], HouseInfo[playerid][hExitz]))
{
SendClientMessage(playerid, COLOR_GREY, "You are not inside your home.");
return 1;
}
ShowPlayerDialog(playerid,1144,DIALOG_STYLE_LIST,"Safe House","Deposit\nBooty\nBalance","okay","cancel");
return 1;
}
}
Re: Help /safehouse -
zDivine - 17.11.2012
Quote:
Originally Posted by Freak@
Wanted your help to fix my command / safe for the player to use the command in your home, but the error and giving ta to use this command inside the houses of other players.
pawn Code:
if(strcmp(cmd,"/safehouse",true)==0) { for(new h = 0; h < sizeof(HouseInfo); h++) { if (!PlayerToPoint(3, playerid,HouseInfo[playerid][hExitx], HouseInfo[playerid][hExity], HouseInfo[playerid][hExitz])) { SendClientMessage(playerid, COLOR_GREY, "You are not inside your home."); return 1; } ShowPlayerDialog(playerid,1144,DIALOG_STYLE_LIST,"Safe House","Deposit\nBooty\nBalance","okay","cancel"); return 1; } }
|
What you are doing here is getting the distance between to player and the point defined inside the home, you need to use 'IsPlayerInRangeOfPoint'.
Re: Help /safehouse -
Freak@ - 17.11.2012
Quote:
Originally Posted by zDivine
What you are doing here is getting the distance between to player and the point defined inside the home, you need to use 'IsPlayerInRangeOfPoint'.
|
The business and realizing not to make the code indetificar if the player is inside your home gm and my GF.