SA-MP Forums Archive
Counter Strike Minigame : Problem .. Please 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: Counter Strike Minigame : Problem .. Please Help! (/showthread.php?tid=298142)



Counter Strike Minigame : Problem .. Please Help! - YoUnG_KiD - 19.11.2011

Hey Guyz...
I need a help with this Counter srtike minigame by Xaviour212.. i am getting this error...

Код:
C:\Documents and Settings\user\Desktop\CS 1.6.pwn(10) : fatal error 100: cannot read from file: "sscanf"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
This is the code.. i made it as a filterscript... Please help me too fix this...

PHP код:
/*=====================Counter Strike Minigame by Xaviour212====================
    Credits :
        - Xaviour212, Make command, Team Radio and C4 System
        - Xtrememood, plan for making this script
        - Peinneon, tester
============================Please Dont Remove The============================*/
#include <a_samp>
#include <streamer>
#include <sscanf>
#define TEAM_RED 1
#define TEAM_BLUE 2
#define COLOR_RED 0xAA3333AA
#define COLOR_BLUE    0x33CCFFAA
#define COLOR_ERROR 0xFF6A6AFF
#define COLOR_BOMB 0x96BD6AFF
new gTeam[MAX_PLAYERS];
new 
IsPlanted[MAX_PLAYERS];
new 
BombTimer;
new 
DefuseTimer;
new 
BombC;
#if defined FILTERSCRIPT
#else
main()
{
    print(
"\n=========================================");
    print(
" Counter Strike Minigame by Xaviour212");
    print(
"=========================================\n");
}
#endif
public OnFilterScriptInit()
{
    print(
"\n=========================================");
    print(
" Counter Strike Minigame by Xaviour212");
    print(
"=========================================\n");
    
//
    
CreateDynamicObject(48433788.556640625, -100722.8004837036132.422485351562514.26025390625359.37927246094);
    
CreateDynamicObject(184503788.0417480469, -1074.357055664128.603553771973271.82019042969105.94512939453105.95275878906);
    
CreateDynamicObject(184503752.2565917969, -1034.46679687530.965980529785271.81823730469105.941101074229.951904296875);
    
CreateDynamicObject(184503795.3010253906, -994.786132812530.98892593383887.696228027344130.62664794922229.35363769531);
    
CreateDynamicObject(184503829.0361328125, -1033.73632812528.46641921997187.69836425781340.512084960938223.51135253906);
    
CreateDynamicObject(58363762.46875, -1060.965454101633.749580383301000);
    
CreateDynamicObject(32443817.2033691406, -1006.702941894523.351663589478000);
    
CreateDynamicObject(114263763.2980957031, -1048.727416992222.138051986694000);
    
CreateDynamicObject(114403763.1037597656, -1040.173339843822.192417144775000);
    
CreateDynamicObject(114443761.8654785156, -1023.929138183623.295633316040087);
    
CreateDynamicObject(114473763.8076171875, -1014.564575195323.7250099182130.25083.5);
    
CreateDynamicObject(114593809.7502441406, -1006.702453613322.369380950928000);
    
CreateDynamicObject(114253788.8916015625, -1063.100585937523.222801208496000);
    
CreateDynamicObject(28923763.8696289063, -1039.896850585925.301792144775000);
    
CreateDynamicObject(32773814.0671386719, -1065.799804687520.544910430908000);
    
CreateDynamicObject(32793762.6506347656, -1003.151672363324.117984771729000);
    
CreateDynamicObject(160933787.5080566406, -1004.990173339824.341495513916000);
    
CreateDynamicObject(38843813.9548339844, -1065.942382812520.519918441772000);
    
CreateDynamicObject(29773788.9877929688, -1066.176879882821.319984436035000);
    
CreateDynamicObject(48823796.8549804688, -1037.281982421926.579437255859000);
    
CreateDynamicObject(16373770.4956054688, -1067.588378906322.887557983398000);
    
CreateDynamicObject(136373816.90234375, -1040.414184570321.758207321167000);
    
CreateDynamicObject(14543800.2314453125, -1005.205505371124.239179611206000);
    
CreateDynamicObject(14573778.3935546875, -1004.356140136725.944948196411000);
    
CreateDynamicObject(14583771.2314453125, -1033.545532226623.3118724823000);
    
CreateDynamicObject(14833788.2023925781, -1066.614013671923.287937164307000);
    
CreateDynamicObject(32523797.9787597656, -1058.700683593821.185646057129000);
    
CreateDynamicObject(148753780.8703613281, -1051.870483398422.676380157471000);
    
CreateDynamicObject(164053782.0483398438, -1067.846191406323.358337402344000);
    
CreateDynamicObject(164063826.7817382813, -1021.505493164126.651744842529000);
    
CreateDynamicObject(14523791.9660644531, -1000.981079101625.533332824707000);
    
CreateDynamicObject(14633770.9719238281, -1052.336059570322.586893081665000);
    
CreateDynamicObject(6153776.9450683594, -1056.18164062521.17707824707000);
    
CreateDynamicObject(6543788.8693847656, -1031.638549804722.414892196655000);
    
CreateDynamicObject(6543798.4265136719, -1001.950317382823.328159332275000);
    
CreateDynamicObject(6603820.4982910156, -1064.263183593820.781923294067000);
    
CreateDynamicObject(6713774.3537597656, -1013.587707519523.751955032349000);
    
CreateDynamicObject(6723770.8112792969, -997.6823120117224.484878540039000);
    
CreateDynamicObject(7003769.8898925781, -1025.945556640623.43603515625000);
    
CreateDynamicObject(7033779.4379882813, -1019.922973632823.190059661865000);
    
CreateDynamicObject(7063805.1826171875, -1018.356750488322.39249420166000);
    
CreateDynamicObject(7263813.5812988281, -1057.422607421920.876085281372000);
    
CreateDynamicObject(7293758.0971679688, -1049.380615234422.193546295166000);
    
CreateDynamicObject(7633782.6611328125, -1027.32812523.002702713013000);
    
CreateDynamicObject(7443783.7329101563, -1038.34570312522.306625366211000);
    
CreateDynamicObject(7493803.3459472656, -1055.215698242220.71215057373000);
    
CreateDynamicObject(7483782.2346191406, -1040.979492187523.45666885376000);
    
CreateDynamicObject(7503808.3913574219, -1032.606079101621.548503875732000);
    
CreateDynamicObject(7443802.9118652344, -1048.464721679721.382221221924000);
    return 
1;
}
public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerTeamFromClass(playerid);
    return 
1;
}
SetPlayerTeamFromClass(playerid)
{
    
gTeam[playerid] = TEAM_RED;
    
gTeam[playerid] = TEAM_BLUE;
}
public 
OnPlayerConnect(playerid)
{
    
SendClientMessage(playeridCOLOR_RED"----------->This server use CS Minigame<----------");
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
SetPlayerTeam(playerid0);
      
TogglePlayerControllable(playerid,1);
      
SetPlayerArmour(playerid0);
      
SetPlayerHealth(playerid100);
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    new 
id;
    if (
strcmp(cmdtext"/Terrorist"true) == 0)
    {
         new 
name[MAX_PLAYER_NAME], string[44];
        
GetPlayerName(playeridnamesizeof(name));
        
format(stringsizeof(string), "%s has joined the Terrorist.",name);
        
SendClientMessageToAll(0xFFFF00AAstring);
        
SetPlayerPos(playerid3811.0046,-1040.1082,22.4528);
        
SendClientMessage(playeridCOLOR_RED"Your team is Team Red or Terrorist");
        
SetPlayerTeam(playeridTEAM_RED);
        
SetPlayerColor(playeridCOLOR_RED);
        
SetPlayerHealth(playerid100);
        
SetPlayerArmour(playerid100);
        
SetPlayerSkin(playerid179);
        
GivePlayerWeapon(playerid2410000);
        
GivePlayerWeapon(playerid2510000);
        
GivePlayerWeapon(playerid3210000);
        
GivePlayerWeapon(playerid3310000);
        
GivePlayerWeapon(playerid3010000);
        
GivePlayerMoney(playerid, -100);
        return 
1;
    }
    if (
strcmp(cmdtext"/CT"true) == 0)
    {
        new 
name[MAX_PLAYER_NAME], string[44];
        
GetPlayerName(playeridnamesizeof(name));
        
format(stringsizeof(string), "%s has joined the Counter-Terrorist.",name);
        
SendClientMessageToAll(0xFFFF00AAstring);
        
SetPlayerPos(playerid3756.1958,-1022.8865,24.7479);
        
SendClientMessage(playeridCOLOR_BLUE"Your team is Team Blue or Counter-Terrorist");
        
SetPlayerTeam(playeridTEAM_BLUE);
        
SetPlayerColor(playeridCOLOR_BLUE);
        
SetPlayerHealth(playerid100);
        
SetPlayerArmour(playerid100);
        
SetPlayerSkin(playerid285);
        
GivePlayerWeapon(playerid2210000);
        
GivePlayerWeapon(playerid2710000);
        
GivePlayerWeapon(playerid2910000);
        
GivePlayerWeapon(playerid3110000);
        
GivePlayerWeapon(playerid3410000);
        
GivePlayerMoney(playerid, -100);
        return 
1;
    }
    if (
strcmp(cmdtext"/plant"true) == 0)
    {
        if(
IsPlanted[id] == 0)
        {
            if(
GetPlayerTeam(playerid) == TEAM_RED)
            {
                 if(
IsPlayerInRangeOfPoint(playerid7.03787.4651,-1002.8569,25.4665))
                {
                     
IsPlanted[id] = 1;
                     
BombTimer SetTimer("Bomb",30000,false);
                     
SendClientMessageToAll(COLOR_BLUE"The Bomb has been planted");
                     
BombC CreateDynamicCP(3787.4651,-1002.8569,25.46651.5, -1, -1, -1100.0);
                     return 
1;
                }
                else return 
SendClientMessage(playeridCOLOR_ERROR"(ERROR) You must in CT Generator Room");
            }
            else return 
SendClientMessage(playeridCOLOR_ERROR"(ERROR) Only Terrorist can use this command");
        }
        else return 
SendClientMessage(playeridCOLOR_ERROR"(ERROR) Bomb has been planted");
    }
    return 
0;
}
forward Bomb();
public 
Bomb()
{
    new 
playeridid;
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
CreateExplosion(3787.4651,-1002.8569,25.46656150.0);
    
IsPlanted[id] = 0;
    
SendClientMessageToAll(COLOR_BOMB"Bomb exploded. Terrorist win");
    
GameTextForPlayer(playerid,"~r~Terrorist Win",3000,5);
    
TogglePlayerControllable(playerid,0);
    
KillTimer(DefuseTimer);
    
SetTimer("Spawn",3000,false);
    if(
GetPlayerTeam(playerid) == TEAM_RED)
    {
        
GivePlayerMoney(playerid5000);
    }
    if(
GetPlayerTeam(playerid) == TEAM_BLUE)
    {
        
GivePlayerMoney(playerid2500);
    }
    
DestroyDynamicCP(BombC);
}
forward Spawn();
public 
Spawn()
{
    new 
playerid;
    for(new 
0MAX_PLAYERSi++) {
        if(
GetPlayerTeam(playerid) == TEAM_RED)
        {
            
SpawnPlayer(i);
        }
        if(
GetPlayerTeam(playerid) == TEAM_BLUE)
        {
            
SpawnPlayer(i);
        }
    }
}
forward Defuse();
public 
Defuse()
{
    new 
playerid;
    new 
id;
    
SendClientMessageToAll(COLOR_BOMB"Bomb has been defuse");
     
GameTextForPlayer(playerid,"~b~Counter-Terrorist Win",3000,5);
     
TogglePlayerControllable(playerid,0);
     
KillTimer(BombTimer);
    
SetTimer("Spawn",3000,false);
    
IsPlanted[id] = 0;
    if(
GetPlayerTeam(playerid) == TEAM_RED)
    {
        
GivePlayerMoney(playerid2500);
    }
    if(
GetPlayerTeam(playerid) == TEAM_BLUE)
    {
        
GivePlayerMoney(playerid5000);
    }
    
DestroyDynamicCP(BombC);
}
public 
OnPlayerEnterDynamicCP(playeridcheckpointid)
{
    if(
checkpointid == BombC)
    {
        if(
GetPlayerTeam(playerid) == TEAM_BLUE)
        {
             if(
IsPlayerInRangeOfPoint(playerid7.03787.4651,-1002.8569,25.4665))
            {
                if(
IsPlanted[playerid] == 1)
                {
                    
SendClientMessage(playeridCOLOR_RED"Bomb being defused");
                    
DefuseTimer SetTimer("Defuse",10000,false);
                    if(
IsPlanted[playerid] == 0)
                    {
                        
SendClientMessageToAll(COLOR_BOMB"Defused failed");
                    }
                    return 
1;
                }
                else return 
SendClientMessage(playeridCOLOR_ERROR"(ERROR) Bomb has not been planted");
            }
            else return 
SendClientMessage(playeridCOLOR_ERROR"(ERROR) You must in Generator");
        }
        else return 
SendClientMessage(playeridCOLOR_ERROR"(ERROR) Only CT can defused the bomb");
    }
    return 
1;
}
public 
OnPlayerLeaveDynamicCP(playeridcheckpointid)
{
    if(
GetPlayerTeam(playerid) == TEAM_BLUE)
    {
        
KillTimer(DefuseTimer);
        
SendClientMessage(playeridCOLOR_ERROR"(ERROR) Defuse failed, you must in checkpoint to defuse bomb");
    }

Thnx in Advance


Re: Counter Strike Minigame : Problem .. Please Help! - YoUnG_KiD - 19.11.2011

HELP ME PLEASE!


Re: Counter Strike Minigame : Problem .. Please Help! - park4bmx - 19.11.2011

make sure sscanf incldue & plugin are un your server Incldues & Plugins folder
and use sscanf2


Re: Counter Strike Minigame : Problem .. Please Help! - YoUnG_KiD - 19.11.2011

Thnx +rep as i told!