Scripter need's help again! - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Scripter need's help again! (
/showthread.php?tid=129179)
Scripter need's help again! -
[LSR]State_Trooper - 21.02.2010
Ok, Now I have been trying to fugure this out for about 3 days now, I have searched and searched.
What I am trying to do is:
When a player is in a certin spot, and type something like /lockerroom a menu/Textdraw will come up and say enter the password. Which will then put the player in their uniform r give them a gun etc.
If any scripter's need any clarification, Ask me. I am a scripter my self so I will understand.
Thanks everyone!
Re: Scripter need's help again! -
Born2die - 21.02.2010
Use PlayerToPoint.
Re: Scripter need's help again! -
Sergei - 21.02.2010
Lol? If you can't do that you can't call yourself a "scripter" ...
pawn Код:
CMD:lockerroom(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,1.00,....))
{
ShowPlayerDialog(playerid,....);
}
else SendClientMessage(playerid,0xFFFFFF,"You are not near any locker.");
return 1;
}
Re: Scripter need's help again! -
[LSR]State_Trooper - 21.02.2010
I dont play with menu's and textdraws, I do alot more stuff not diologs and that crapppy stuff.
Re: Scripter need's help again! -
Naruto4 - 21.02.2010
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/locker", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0 , 0.0,0.0,0.0) && PlayerInfo[playerid][pFaction] == 1) // change this to your variables
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Cops Lockers","Type in the cops password and you will get your uniform.","Confirm","Quit");
}
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(strval(inputtext) == 12345) // the password
{
SetPlayerSkin(playerid,160); // change it
}
}
return 1;
}