A few questions.
#1

Here are a few questions...

How do I teleport ALL players to Area51?
How do I set ALL players into 2 teams?

Thank you!
Reply
#2

1.
Код:
for (new i= 0; i<MAX_PLAYERS; i++)
{
SetPlayerPos(i, <InsertChiliadX>, <InsertChiliadY>, <InsertChiliadZ>);
<if you want>
SetPlayerFacingAngle(i, <angle>);
}
2.
https://sampwiki.blast.hk/wiki/PAWN_tuto...eam_deathmatch
Reply
#3

What am I doing wrong here?
Код:
#include <a_samp>
#define TEAM_GANG 0
#define TEAM_LSPD 1
new gTeam[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp("/startevent", cmdtext, true))
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
               for (new i= 0; i<MAX_PLAYERS; i++)
             {
                SetPlayerPos(i, 245,3445, 1862,654 , 18,02273 );
                PlayerPlaySound(i,1057,0.0,0.0,0.0);
                GivePlayerWeapon(i,31,350);
                GivePlayerWeapon(i,24,350);
                GivePlayerWeapon(i,26,350);
                GivePlayerWeapon(i,27,350);

        }
        return 1;
 }
    return 0;
}
And this is the Error:
Код:
E:\Program Files\Rockstar Games\GTA San Andreas\pawno\event.pwn(13) : warning 219: local variable "i" shadows a variable at a preceding level
E:\Program Files\Rockstar Games\GTA San Andreas\pawno\event.pwn(15) : warning 202: number of arguments does not match definition
E:\Program Files\Rockstar Games\GTA San Andreas\pawno\event.pwn(15) : warning 202: number of arguments does not match definition
E:\Program Files\Rockstar Games\GTA San Andreas\pawno\event.pwn(15) : warning 202: number of arguments does not match definition
E:\Program Files\Rockstar Games\GTA San Andreas\pawno\event.pwn(23) : warning 217: loose indentation
E:\Program Files\Rockstar Games\GTA San Andreas\pawno\event.pwn(25) : warning 217: loose indentation
E:\Program Files\Rockstar Games\GTA San Andreas\pawno\event.pwn(27) : error 030: compound statement not closed at the end of file (started at line 9)
Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

pawn Код:
#include <a_samp>
#define TEAM_GANG 0
#define TEAM_LSPD 1
new gTeam[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp("/startevent", cmdtext, true))
    {
        for (new ii= 0; ii<MAX_PLAYERS; ii++)
        {
            if(IsPlayerConnected(i))
            {
                SetPlayerPos(i, 245,3445, 1862,654 , 18,02273 );
                PlayerPlaySound(i,1057,0.0,0.0,0.0);
                GivePlayerWeapon(i,31,350);
                GivePlayerWeapon(i,24,350);
                GivePlayerWeapon(i,26,350);
                GivePlayerWeapon(i,27,350);
                }

        return 1;
 }
    return 0;
}
Reply
#5

Thank you.
Reply
#6

Sorry for double post, but when RetardedWolf gave me that code it is now 8 errors and he didn't fix my error.

Please help somebody!
Reply
#7

Код:
#include <a_samp>
#define TEAM_GANG 0
#define TEAM_LSPD 1
new gTeam[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp("/startevent", cmdtext, true))
    {
        for (new i= 0; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                SetPlayerPos(i, 245,3445, 1862,654 , 18,02273 );
                PlayerPlaySound(i,1057,0.0,0.0,0.0);
                GivePlayerWeapon(i,31,350);
                GivePlayerWeapon(i,24,350);
                GivePlayerWeapon(i,26,350);
                GivePlayerWeapon(i,27,350);
                }
        }
        return 1;
    }
    return 0;
}
I'm not sure if it will work or not.
Reply
#8

Yes, it worked. Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)