need some help
#1

how do i make a command that 2 players should type to work.
like Example : if player and his mate is in 2 pickups or chechkpoints type /Teamwork the command will work
if there is one player in the one pickup/checkpoint and his mate isnt in the pickup/checkpoint and type /teamwork , Error your friend isnt in the other pickup/checkpoint.

Something like this, how can i make that.?
Reply
#2

Convoy?
Reply
#3

first:
pawn Код:
new teamwork[MAX_PLAYERS]
second
on the command do that:
pawn Код:
teamwork(playerid) = +1;
and the if in command
pawn Код:
if(teamwork(playerid) == 2);
{
teamwork(playerid) = 0;
//the other things
}
Reply
#4

Wait a minute i dont get it.
can you explain a little more better? thanks.
Reply
#5

I mean by that:
pawn Код:
new teamwork[MAX_PLAYERS]
define "teamwork" symbol
and by that:
pawn Код:
teamwork(playerid) = +1;
the first player when he use the command, he will sign that he used it and when the second one use it, the content will happen in this moment.
and:
pawn Код:
if(teamwork(playerid) == 2);
{
for the check if 2 players used that command.
and:
pawn Код:
teamwork(playerid) = 0;
to make the the teamwork 0 after the content happen



I have edit in the command:

the new things:

first:
pawn Код:
new teamwork[MAX_PLAYERS];
new teamwork;
second:
on the command do that:
pawn Код:
teamwork(playerid) = +1;
teamwork = +1;
and the if in command
pawn Код:
if(teamwork(playerid) == 2 && teamwork = 2);
{
teamwork(playerid) = 0;
teamwork = 0;
//the other things
}
all:
pawn Код:
//top of the script
new teamwork[MAX_PLAYERS];
new teamwork;
//the command
CMD:teamwork(playerid,params[])
{
 teamwork(playerid) = +1;
 teamwork = +1;
   if(teamwork(playerid) == 2 && teamwork = 2);
   {
     teamwork(playerid) = 0;
     teamwork = 0;
     //the other things (content)
     }
}
Reply
#6

this is full of errors that are unable to fix them
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)