need some help - 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)
+--- Thread: need some help (
/showthread.php?tid=502926)
need some help -
iThePunisher - 26.03.2014
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.?
Re: need some help -
DerickClark - 26.03.2014
Convoy?
Re: need some help -
AhmedMohamed - 26.03.2014
first:
pawn Код:
new teamwork[MAX_PLAYERS]
second
on the command do that:
and the if in command
pawn Код:
if(teamwork(playerid) == 2);
{
teamwork(playerid) = 0;
//the other things
}
Re: need some help -
iThePunisher - 26.03.2014
Wait a minute i dont get it.
can you explain a little more better? thanks.
Re: need some help -
AhmedMohamed - 26.03.2014
I mean by that:
pawn Код:
new teamwork[MAX_PLAYERS]
define "teamwork" symbol
and by that:
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:
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)
}
}
Re: need some help -
iThePunisher - 27.03.2014
this is full of errors that are unable to fix them