How would i make this
#1

How would i make a duel system were a player types /duelsawn /dueluzi ect.. It send a clientmessagetoall saying [Player Name] Has create a sawn off duel type /duelsawn to join, then it the other player types /duelsawn they get teleports to my cords i put, then first on to 2 kills wins, and once a player wins it sends a clientmessagetoall Player [player name] wont a duel against [player name] then the score [ 2-1] 2-0] ect.

+ Rep if you can help me
Reply
#2

ok mate ill go and make a quick script for u but i want u to learn from it ok
Reply
#3

Ok thanks man
Reply
#4

wut color u want the message
Reply
#5

Blue, or any i know how to change the colours. :P
Reply
#6

kk put this under #include <a_samp>
so it looks like this
#include <a_samp>
#define Blue 0x0000BBAA

then wait
Reply
#7

Okay
Reply
#8

Код:
			if(strcmp(cmdtext,"/DuelSawn", true, 3))
		{
			new str[128];
			GetPlayerName(playerid, str, sizeof(str));
			format(str, sizeof(str), "%s Has Started a Sawn Off Shotgun Duel type /joinSawnoffDuel to join", str, cmdtext[4]);
			SendClientMessageToAll(Blue, str);
			GivePlayerWeapon(playerid, 26, 99999);
   			SetPlayerPos(playerid, 1547.1478, -1675.3250, 13.9536);
			return 1;
		)
		if(strcmp(cmdtext,"/DuelUzi", true, 3))
		{
		    new str[128];
		    GetPlayerName(playerid, str, sizeof,(str));
		    format(str, sizeof(str), "%s Has Started a Uzi Duel Type /JoinUziDuel to join", str, cmdtext[4]);
		    SendClientMessageToAll(Blue, str);
		    GivePlayerWeapon(playerid, 28, 99999);
			SetPlayerPos(playerid, 1547.1478, -1675.3250, 13.9536);
		    return 1;
		}
		if(strcmp(cmdtext,"/JoinSawnoffDuel", true, 3))
		{
		    new str[128];
		    GetPlayerName(playerid, str, sizeof,(str));
		    format(str, sizeof(str), "%s Has Joined a player In A Sawn Off Shotgun Duel", str, cmdtext[4]);
		    SendClientMessageToAll(Blue, str);
		    GivePlayerWeapon(playerid, 26, 99999);
			SetPlayerPos(playerid, 1547.1478, -1675.3250, 13.9536);
		    return 1;
		}
		if(strcmp(cmdtext,"/joinUziDuel", true, 3))
		{
		    new str[128];
		    GetPlayerName(playerid, str, sizeof,(str));
		    format(str, sizeof(str), "%s Has Joined a player In A Uzi Duel", str, cmdtext[4]);
		    SendClientMessageToAll(Blue, str);
		    GivePlayerWeapon(playerid, 28, 99999);
			SetPlayerPos(playerid, 1547.1478, -1675.3250, 13.9536);
			return 1;
		}
Untested but it should work but idk
Reply
#9

You should change the last parameter of strcmp() to the length of the string
Reply
#10

u can edit it if u want
Reply
#11

warning 225: unreachable code
: warning 217: loose indentation
: error 029: invalid expression, assumed zero
: warning 215: expression has no effect
: error 001: expected token: ";", but found "if"
: warning 219: local variable "str" shadows a variable at a preceding level
: error 020: invalid symbol name ""
: warning 215: expression has no effect
: error 001: expected token: ";", but found ")"
: error 029: invalid expression, assumed zero
: fatal error 107: too many error messages on one line

-
-- Lol :/
Reply
#12

lol
Reply
#13

hmmm this isn`t a duel u just make that when player type those it give weapon and change his pos but if he die or player win it wont say anything even the player will stay there till he do /kill or something like this u should use a variable + to check how many players join then lock it and start the round and who stay the last he win and get rep + msg will appear to all
Reply
#14

but i dont know how to do that xD im quite a newbie at scripting and im trying my best



This forum requires that you wait 120 seconds between posts. Please try again in 1 second. that annoys me
Reply
#15

That code was nothing what i wanted, no saying player %s has created a duel type /duelsawnoff to join,
Then player %s has joined to the sawn off duel,
and no score limit, ect.. :/
Reply
#16

....
Reply
#17

P.S can i use this also then
Reply
#18

sure u can but give me rep
Reply
#19

i will now and can u help me on my topic Dcmd problem
Reply
#20

Ty unknown killer repped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)