How would i make this? - 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: How would i make this? (
/showthread.php?tid=277520)
How would i make this? -
Lower - 18.08.2011
I'm not asking for a full on script from someone, but if thats posisble i would appreciate it, i'm really new to scripting, i'd like to know how to make something like this:
Quote:
Player Types: /duel <weaponid> <playerid1> <playerid2>.
playerid1 = 'your aka PLAYERS id'
playerid2 = 'Your opponent id aka Playerid2! "
Once this command has been type the opponent will receive a client message saying something like this:
' Player1 ( Player1's name ) has challenged you to a duel, type /acceptduel to accept.
|
Would appreciate some help!
Thanks
Re: How would i make this? -
Riddick94 - 18.08.2011
Create global variable where you will save a <playerid1> id and then use sscanf where you will make this:
pawn Код:
if(sscanf(params, "ddd", weaponid, giveplayerid, receiverid))
giveplayerid is <playerid1>
receiverid is <playerid2>
set to global variable giveplayerid.
(as you told /duel <weaponid> <playerid1> <playerid2> looks like command for admin because you wan't make duel between two players.)
Then ShowPlayerDialog a receiverid and in OnDialogResponse check response.
if response was true you can make set player pos or other functions what you wan't.
Re: How would i make this? -
Lower - 19.08.2011
Quote:
Originally Posted by Riddick94
Create global variable where you will save a <playerid1> id and then use sscanf where you will make this:
pawn Код:
if(sscanf(params, "ddd", weaponid, giveplayerid, receiverid))
giveplayerid is <playerid1>
receiverid is <playerid2>
set to global variable giveplayerid.
(as you told /duel <weaponid> <playerid1> <playerid2> looks like command for admin because you wan't make duel between two players.)
Then ShowPlayerDialog a receiverid and in OnDialogResponse check response.
if response was true you can make set player pos or other functions what you wan't.
|
This is confusing, sorry im totally new to PAWN, can you describe a little better or anyone else know something that can help me?
Re: How would i make this? -
Kingunit - 19.08.2011
Use the search function. There is a filterscript that can help you ALOT
Re: How would i make this? -
Riddick94 - 19.08.2011
What command you wanted. For admins or for players?
Admins: /duel (weapon_id) (playerid) (playerid2)
Players: /duel (weapon_id) (playerid2)
Choose your way. I will do this for you but only this time.