How would i make this?
#1

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
Reply
#2

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.
Reply
#3

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?
Reply
#4

Use the search function. There is a filterscript that can help you ALOT
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)