#1

How to make this so only ARMY can pick up the pickup's?... Right now can only the admins pick the pickup's

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

#define COLOR_GREEN 0x33AA33AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_CRIMSON 0xDC143CAA

#pragma tabsize 0

//Pickup's
new HealthPickup;
new ArmourPickup;
new MinigunPickup;
new GrenadePickup;
//Checkpoints
new EnterHouse, ExitHouse;


public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" ARMY Pickup's By Larsey123");
    print("-------------------------------------------\n");

    //Pickup
    HealthPickup = CreatePickup(1240, 23, 960.9189453125,2102.4846191406,1011.0274047852); //Health
    ArmourPickup = CreatePickup(1242, 23, 963.43518066406,2102.4033203125,1011.0276489258); //Armour
    MinigunPickup = CreatePickup(362, 23, 958.79949951172,2097.1181640625,1011.0217895508); //Minigun
    GrenadePickup = CreatePickup(342, 23, 932.59777832031,2103.7470703125,1010.4979248047); //Grenade
    //Checkpoints
    EnterHouse = CreatePickup(1273, 23, 966.84710693359,2133.0017089844,10.8203125);
    ExitHouse = CreatePickup(1273, 23, 965.08758544922,-53.164505004883,1001.1245727539);

    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
//Health~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == HealthPickup){
        if(IsPlayerAdmin(playerid)==1){
      SetPlayerHealth(playerid, 100);
      SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"Health for admin, ONLY!");
    }
//Armour~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == ArmourPickup){
        if(IsPlayerAdmin(playerid)==1){
      SetPlayerArmour(playerid, 100);
      SendClientMessage(playerid,COLOR_GREY,"You picked up Armour!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"Armour for admin, ONLY!");
    }
//Minigun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == MinigunPickup){
        if(IsPlayerAdmin(playerid)==1){
      GivePlayerWeapon(playerid, 38, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Minigun!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"Minigun for admin, ONLY!");
    }
//Grenade~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == GrenadePickup){
        if(IsPlayerAdmin(playerid)==1){
      GivePlayerWeapon(playerid, 16, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Grenade!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"Greande for admin, ONLY!");
    }
//EnterHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == EnterHouse){
        if(IsPlayerAdmin(playerid)==1){
            SetPlayerPos(playerid,963.37561035156,-53.307209014893,1001.124572);
            SetPlayerInterior(playerid,  3 );
            SendClientMessage(playerid,COLOR_CRIMSON,"Welcome to the Admin House!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"You connot enter, Just for admins!");
    }
//ExitHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   if( pickupid == ExitHouse){
        SetPlayerPos(playerid,969.80432128906,2133.1311035156,10.8203);
        SetPlayerInterior(playerid,  0 );
        SendClientMessage(playerid,COLOR_CRIMSON,"You have left the Admin House!");
    }
    return 0;
}
Reply
#2

Quote:
Originally Posted by Larsey123IsMe
Посмотреть сообщение
How to make this so only ARMY can pick up the pickup's?... Right now can only the admins pick the pickup's

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

#define COLOR_GREEN 0x33AA33AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_CRIMSON 0xDC143CAA

#pragma tabsize 0

//Pickup's
new HealthPickup;
new ArmourPickup;
new MinigunPickup;
new GrenadePickup;
//Checkpoints
new EnterHouse, ExitHouse;


public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" ARMY Pickup's By Larsey123");
    print("-------------------------------------------\n");

    //Pickup
    HealthPickup = CreatePickup(1240, 23, 960.9189453125,2102.4846191406,1011.0274047852); //Health
    ArmourPickup = CreatePickup(1242, 23, 963.43518066406,2102.4033203125,1011.0276489258); //Armour
    MinigunPickup = CreatePickup(362, 23, 958.79949951172,2097.1181640625,1011.0217895508); //Minigun
    GrenadePickup = CreatePickup(342, 23, 932.59777832031,2103.7470703125,1010.4979248047); //Grenade
    //Checkpoints
    EnterHouse = CreatePickup(1273, 23, 966.84710693359,2133.0017089844,10.8203125);
    ExitHouse = CreatePickup(1273, 23, 965.08758544922,-53.164505004883,1001.1245727539);

    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
//Health~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == HealthPickup){
        if(IsPlayerAdmin(playerid)==1){
      SetPlayerHealth(playerid, 100);
      SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"Health for admin, ONLY!");
    }
//Armour~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == ArmourPickup){
        if(IsPlayerAdmin(playerid)==1){
      SetPlayerArmour(playerid, 100);
      SendClientMessage(playerid,COLOR_GREY,"You picked up Armour!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"Armour for admin, ONLY!");
    }
//Minigun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == MinigunPickup){
        if(IsPlayerAdmin(playerid)==1){
      GivePlayerWeapon(playerid, 38, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Minigun!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"Minigun for admin, ONLY!");
    }
//Grenade~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == GrenadePickup){
        if(IsPlayerAdmin(playerid)==1){
      GivePlayerWeapon(playerid, 16, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Grenade!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"Greande for admin, ONLY!");
    }
//EnterHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == EnterHouse){
        if(IsPlayerAdmin(playerid)==1){
            SetPlayerPos(playerid,963.37561035156,-53.307209014893,1001.124572);
            SetPlayerInterior(playerid,  3 );
            SendClientMessage(playerid,COLOR_CRIMSON,"Welcome to the Admin House!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"You connot enter, Just for admins!");
    }
//ExitHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   if( pickupid == ExitHouse){
        SetPlayerPos(playerid,969.80432128906,2133.1311035156,10.8203);
        SetPlayerInterior(playerid,  0 );
        SendClientMessage(playerid,COLOR_CRIMSON,"You have left the Admin House!");
    }
    return 0;
}
you have to make teams first, then use
if(gTeam[playerid] == TEAM_ARMY)
{
//Health~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
if( pickupid == HealthPickup){
if(IsPlayerAdmin(playerid)==1){
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!");
}
else return SendClientMessage(playerid,COLOR_CRIMSON,"Health for admin, ONLY!");
}
//Armour~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
if( pickupid == ArmourPickup){
if(IsPlayerAdmin(playerid)==1){
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid,COLOR_GREY,"You picked up Armour!");
}
else return SendClientMessage(playerid,COLOR_CRIMSON,"Armour for admin, ONLY!");
}
//Minigun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
if( pickupid == MinigunPickup){
if(IsPlayerAdmin(playerid)==1){
GivePlayerWeapon(playerid, 38, 99999);
SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Minigun!");
}
else return SendClientMessage(playerid,COLOR_CRIMSON,"Minigun for admin, ONLY!");
}
//Grenade~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
if( pickupid == GrenadePickup){
if(IsPlayerAdmin(playerid)==1){
GivePlayerWeapon(playerid, 16, 99999);
SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Grenade!");
}
else return SendClientMessage(playerid,COLOR_CRIMSON,"Greande for admin, ONLY!");
}
//EnterHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
if( pickupid == EnterHouse){
if(IsPlayerAdmin(playerid)==1){
SetPlayerPos(playerid,963.37561035156,-53.307209014893,1001.124572);
SetPlayerInterior(playerid, 3 );
SendClientMessage(playerid,COLOR_CRIMSON,"Welcome to the Admin House!");
}
else return SendClientMessage(playerid,COLOR_CRIMSON,"You connot enter, Just for admins!");
}
//ExitHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
if( pickupid == ExitHouse){
SetPlayerPos(playerid,969.80432128906,2133.1311035 156,10.8203);
SetPlayerInterior(playerid, 0 );
SendClientMessage(playerid,COLOR_CRIMSON,"You have left the Admin House!");
}
}
Reply
#3

Quote:
Originally Posted by DaneAMattie
Посмотреть сообщение
you have to make teams first, then use
if(gTeam[playerid] == TEAM_ARMY)
{
//Health~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
if( pickupid == HealthPickup){
if(IsPlayerAdmin(playerid)==1){
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!");
}
else return SendClientMessage(playerid,COLOR_CRIMSON,"Health for admin, ONLY!");
}
//Armour~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
if( pickupid == ArmourPickup){
if(IsPlayerAdmin(playerid)==1){
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid,COLOR_GREY,"You picked up Armour!");
}
else return SendClientMessage(playerid,COLOR_CRIMSON,"Armour for admin, ONLY!");
}
//Minigun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
if( pickupid == MinigunPickup){
if(IsPlayerAdmin(playerid)==1){
GivePlayerWeapon(playerid, 38, 99999);
SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Minigun!");
}
else return SendClientMessage(playerid,COLOR_CRIMSON,"Minigun for admin, ONLY!");
}
//Grenade~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
if( pickupid == GrenadePickup){
if(IsPlayerAdmin(playerid)==1){
GivePlayerWeapon(playerid, 16, 99999);
SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Grenade!");
}
else return SendClientMessage(playerid,COLOR_CRIMSON,"Greande for admin, ONLY!");
}
//EnterHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
if( pickupid == EnterHouse){
if(IsPlayerAdmin(playerid)==1){
SetPlayerPos(playerid,963.37561035156,-53.307209014893,1001.124572);
SetPlayerInterior(playerid, 3 );
SendClientMessage(playerid,COLOR_CRIMSON,"Welcome to the Admin House!");
}
else return SendClientMessage(playerid,COLOR_CRIMSON,"You connot enter, Just for admins!");
}
//ExitHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
if( pickupid == ExitHouse){
SetPlayerPos(playerid,969.80432128906,2133.1311035 156,10.8203);
SetPlayerInterior(playerid, 0 );
SendClientMessage(playerid,COLOR_CRIMSON,"You have left the Admin House!");
}
}
Can you please make the script Without Errors? and please use: [PAWN] (/PAWN]? change the ( to [
Reply
#4

Quote:
Originally Posted by Larsey123IsMe
Посмотреть сообщение
Can you please make the script Without Errors? and please use: [PAWN] (/PAWN]? change the ( to [
it has no errors, its your script but edited, i told you to add teams else it wont work

example, put on top in ur script:

#define TEAM_ARMY 1
#define TEAM_OTHER 2

now on player request spawn make it be the army team if he has an army skin
Reply
#5

So it shouls looks like this?:

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_CRIMSON 0xDC143CAA
#define TEAM_ARMY 1

#pragma tabsize 0

//Pickup's
new HealthPickup;
new ArmourPickup;
new MinigunPickup;
new GrenadePickup;


public OnFilterScriptInit()
{
    //Pickup
    HealthPickup = CreatePickup(1240, 23, 960.9189453125,2102.4846191406,1011.0274047852); //Health
    ArmourPickup = CreatePickup(1242, 23, 963.43518066406,2102.4033203125,1011.0276489258); //Armour
    MinigunPickup = CreatePickup(362, 23, 958.79949951172,2097.1181640625,1011.0217895508); //Minigun
    GrenadePickup = CreatePickup(342, 23, 932.59777832031,2103.7470703125,1010.4979248047); //Grenade
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(gTeam[playerid] == TEAM_ARMY)
{
//Health~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == HealthPickup){
      SetPlayerHealth(playerid, 100);
      SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!");
        }
        else return SendClientMessage(playerid,COLOR_TOMATO,"This Health restore is just for ARMY!");
    }
//Armour~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == ArmourPickup){
      SetPlayerArmour(playerid, 100);
      SendClientMessage(playerid,COLOR_GREY,"You picked up Armour!");
        }
        else return SendClientMessage(playerid,COLOR_TOMATO,"This Armour restore is just for ARMY!");
    }
//Minigun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == MinigunPickup){
      GivePlayerWeapon(playerid, 38, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Minigun!");
        }
        else return SendClientMessage(playerid,COLOR_TOMATO,"This Minigun is just for ARMY!");
    }
//Grenade~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == GrenadePickup){
      GivePlayerWeapon(playerid, 16, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Grenade!");
        }
        else return SendClientMessage(playerid,COLOR_TOMATO,"This Grenade is just for ARMY!");
    }
    return 0;
}
BTW it get 4 Errors
pawn Код:
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(31) : error 017: undefined symbol "gTeam"
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(31) : warning 215: expression has no effect
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(31) : error 001: expected token: ";", but found "]"
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(31) : error 029: invalid expression, assumed zero
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(31) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#6

pawn Код:
static gTeam[MAX_PLAYERS];
Under the teams.
Reply
#7

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_CRIMSON 0xDC143CAA
#define COLOR_TOMATO 0xFF4500AA
#define TEAM_ARMY 1

static gTeam[MAX_PLAYERS];

//Pickup's
new HealthPickup;
new ArmourPickup;
new MinigunPickup;
new GrenadePickup;


public OnFilterScriptInit()
{
    //Pickup
    HealthPickup = CreatePickup(1240, 23, 960.9189453125,2102.4846191406,1011.0274047852); //Health
    ArmourPickup = CreatePickup(1242, 23, 963.43518066406,2102.4033203125,1011.0276489258); //Armour
    MinigunPickup = CreatePickup(362, 23, 958.79949951172,2097.1181640625,1011.0217895508); //Minigun
    GrenadePickup = CreatePickup(342, 23, 932.59777832031,2103.7470703125,1010.4979248047); //Grenade
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(gTeam[playerid] == TEAM_ARMY)
{
//Health~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == HealthPickup){
      SetPlayerHealth(playerid, 100);
      SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!");
        }
        else return SendClientMessage(playerid,COLOR_TOMATO,"This Health restore is just for ARMY!");
    }
//Armour~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == ArmourPickup){
      SetPlayerArmour(playerid, 100);
      SendClientMessage(playerid,COLOR_GREY,"You picked up Armour!");
        }
        else return SendClientMessage(playerid,COLOR_TOMATO,"This Armour restore is just for ARMY!");
    }
//Minigun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == MinigunPickup){
      GivePlayerWeapon(playerid, 38, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Minigun!");
        }
        else return SendClientMessage(playerid,COLOR_TOMATO,"This Minigun is just for ARMY!");
    }
//Grenade~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == GrenadePickup){
      GivePlayerWeapon(playerid, 16, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Grenade!");
        }
        else return SendClientMessage(playerid,COLOR_TOMATO,"This Grenade is just for ARMY!");
    }
    return 0;
}
This got 5 Error's:

pawn Код:
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(42) : warning 217: loose indentation
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(47) : warning 209: function "OnPlayerPickUpPickup" should return a value
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(49) : error 010: invalid function or declaration
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(53) : error 010: invalid function or declaration
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(56) : error 010: invalid function or declaration
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(60) : error 010: invalid function or declaration
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(62) : error 010: invalid function or declaration
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(26) : warning 204: symbol is assigned a value that is never used: "GrenadePickup"
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\ForARMY.pwn(25) : warning 204: symbol is assigned a value that is never used: "MinigunPickup"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Reply
#8

Ur identation is bad!
U also missed some brackets!

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_CRIMSON 0xDC143CAA
#define COLOR_TOMATO 0xFF4500AA
#define TEAM_ARMY 1

static gTeam[MAX_PLAYERS];

//Pickup's
new HealthPickup;
new ArmourPickup;
new MinigunPickup;
new GrenadePickup;


public OnFilterScriptInit()
{
    //Pickup
    HealthPickup = CreatePickup(1240, 23, 960.9189453125,2102.4846191406,1011.0274047852); //Health
    ArmourPickup = CreatePickup(1242, 23, 963.43518066406,2102.4033203125,1011.0276489258); //Armour
    MinigunPickup = CreatePickup(362, 23, 958.79949951172,2097.1181640625,1011.0217895508); //Minigun
    GrenadePickup = CreatePickup(342, 23, 932.59777832031,2103.7470703125,1010.4979248047); //Grenade
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(gTeam[playerid] == TEAM_ARMY)
    {
//Health~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == HealthPickup)
    {
    SetPlayerHealth(playerid, 100);
    SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!");
    }
    else {
    SendClientMessage(playerid,COLOR_TOMATO,"This Health restore is just for ARMY!");
    }
//Armur~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == ArmourPickup){
    SetPlayerArmour(playerid, 100);
    SendClientMessage(playerid,COLOR_GREY,"You picked up Armour!");
    }
    else {
    SendClientMessage(playerid,COLOR_TOMATO,"This Armour restore is just for ARMY!");
    }
//Minigun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == MinigunPickup){
    GivePlayerWeapon(playerid, 38, 99999);
    SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Minigun!");
    }
    else {
    SendClientMessage(playerid,COLOR_TOMATO,"This Minigun is just for ARMY!");
    }
//Grenade~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == GrenadePickup){
    GivePlayerWeapon(playerid, 16, 99999);
    SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Grenade!");
    }
    else {
    SendClientMessage(playerid,COLOR_TOMATO,"This Grenade is just for ARMY!");
    }
    }
    return 1;
}
Reply
#9

Quote:
Originally Posted by ColdXX
Посмотреть сообщение
Ur identation is bad!
U also missed some brackets!

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_CRIMSON 0xDC143CAA
#define COLOR_TOMATO 0xFF4500AA
#define TEAM_ARMY 1

static gTeam[MAX_PLAYERS];

//Pickup's
new HealthPickup;
new ArmourPickup;
new MinigunPickup;
new GrenadePickup;


public OnFilterScriptInit()
{
    //Pickup
    HealthPickup = CreatePickup(1240, 23, 960.9189453125,2102.4846191406,1011.0274047852); //Health
    ArmourPickup = CreatePickup(1242, 23, 963.43518066406,2102.4033203125,1011.0276489258); //Armour
    MinigunPickup = CreatePickup(362, 23, 958.79949951172,2097.1181640625,1011.0217895508); //Minigun
    GrenadePickup = CreatePickup(342, 23, 932.59777832031,2103.7470703125,1010.4979248047); //Grenade
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(gTeam[playerid] == TEAM_ARMY)
    {
//Health~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == HealthPickup)
    {
    SetPlayerHealth(playerid, 100);
    SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!");
    }
    else {
    SendClientMessage(playerid,COLOR_TOMATO,"This Health restore is just for ARMY!");
    }
//Armur~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == ArmourPickup){
    SetPlayerArmour(playerid, 100);
    SendClientMessage(playerid,COLOR_GREY,"You picked up Armour!");
    }
    else {
    SendClientMessage(playerid,COLOR_TOMATO,"This Armour restore is just for ARMY!");
    }
//Minigun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == MinigunPickup){
    GivePlayerWeapon(playerid, 38, 99999);
    SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Minigun!");
    }
    else {
    SendClientMessage(playerid,COLOR_TOMATO,"This Minigun is just for ARMY!");
    }
//Grenade~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == GrenadePickup){
    GivePlayerWeapon(playerid, 16, 99999);
    SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Grenade!");
    }
    else {
    SendClientMessage(playerid,COLOR_TOMATO,"This Grenade is just for ARMY!");
    }
    }
    return 1;
}
Thanks you <3 You know about any GameModes who have the ARMY skill?
Reply
#10

Hmm what do you mean by army skill?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)