Üzenetek megjelenítése

Ez a szekció lehetővé teszi a felhasználó által írt összes hozzászólás megtekintését. Vedd figyelembe, hogy csak azokba a fórumokba írt hozzászólásokat látod, amelyekhez hozzáférésed van.


Üzenetek - N@rbirock

Oldalak: 1 ... 16 17 [18] 19 20 ... 133
256
RP/RPG kérések / /me és társai
« Dátum: 2012. szeptember 14. - 10:15:31 »
Itt a me abból meg tudod csinálni a dot is.
 
CMD:me(playerid, params[])
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
new mesg[128],strin[128];
if(sscanf(params,\"s[128]\",mesg)) return SendClientMessage(playerid,0xFF0000FF,\"Használat: /me [cselekvés]\");
if(IsPlayerInRangeOfPoint(playerid, 7, x, y, z))
{
format(strin,sizeof(strin),\" %s: %s\",UnderscoreToSpaceName(playerid),mesg);
SendClientMessage(playerid,0xc4ff00AA,strin);
SetPlayerChatBubble(playerid, strin, 0xc4ff00AA, 7.0, 10000);
}
return 1;
}
stock UnderscoreToSpaceName(playerid)
{
    new Name0[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
        GetPlayerName(playerid, Name0, sizeof(Name0));
    }
    else
    {
        Name0 = \"Disconnected/Nothing\";
    }
    for(new name0 = 0; name0 < MAX_PLAYER_NAME; name0++) if(Name0[name0] == \'_\') Name0[name0] = \' \';
    return Name0;
}

 
Zcmd és sscanf kell hozzá.

257
Segítségkérés / Autó vásárlás probléma
« Dátum: 2012. szeptember 13. - 23:06:42 »
Florian írt egy autó vásárlás scriptet de nem mûködik mikor belemegyek a pickupba akkor csak teleportál. Mi lehet a baja?
Itt a script:
 
#include <a_samp>
#include <ZcMd>
#define         P_X             747.7859
#define     P_Y     -543.5135
#define     P_Z     15.8657
#define     KI_X    740.9020
#define     KI_Y    -540.5073
#define     KI_Z    16.3500
#define     KI_ROT  0
new bool: Privat[MAX_VEHICLES];
new IdeigID[MAX_PLAYERS];
new Pickup;
new Mentes[MAX_VEHICLES][64 + 1];
new JarmuAdat[][] =
{
        {400, 24999},
        {401, 14999},
        {404, 5999},
        {405, 32999},
        {410, 8999},
        {422, 9999},
        {426, 26999},
        {436, 6999},
        {445, 16999},
        {462, 2999},
        {468, 5999},
        {475, 39999},
        {478, 4999},
        {527, 7999},
        {529, 8999},
        {536, 13999},
        {543, 4999},
        {566, 8999},
        {576, 8999},
        {585, 7999},
        {605, 1299},
        {604, 1299}
};
enum pAdat
{
        Kocsi,
        KocsiID
}
new pInfo[MAX_PLAYERS][pAdat];
enum vAdat
{
        Float:xpos,
        Float:ypos,
        Float:zpos,
        Float:rot,
        model,
        color1,
        color2,
        plate[32 + 1]
}
new vInfo[MAX_VEHICLES][vAdat];
stock create( playerid ) {
        return fclose( fopen(plaFile(playerid), io_readwrite) ), 1;
}
stock LoadPlayerDAT( playerid ) {
        new dest[2][8 + 1];
        new string[32 + 1];
       
    new File: pfile = fopen(plaFile(playerid), io_read);
        if( pfile )
        {
                fread( pfile, string );
                split( string, dest, \',\' );
        }
       
        pInfo[playerid][Kocsi] = strval(dest[0]);
        pInfo[playerid][KocsiID] = strval(dest[1]);
       
        return 1;
}
stock Save( playerid ) {
        new File: pfile = fopen(plaFile(playerid));
        if( pfile )
        {
                new pstring[32 + 1];
                format( pstring, 32, \"%d,%d\", pInfo[playerid][Kocsi], pInfo[playerid][KocsiID] );
                fwrite( pfile, pstring );
                fclose( pfile );
        }
       
        return 1;
}
stock plaFile(playerid) {
        new sz_pString[64 + 1];
        format( sz_pString, 64, \"%s.dat\", playerName(playerid) );
       
        return sz_pString;
}
stock playerName(playerid) {
        new sz_pName[MAX_PLAYER_NAME + 1];
        GetPlayerName(playerid, sz_pName, sizeof(sz_pName) );
       
        return sz_pName;
}
public OnPlayerConnect( playerid ) {
        if( fexist(plaFile(playerid)) ) {
            LoadPlayerDAT( playerid );
        }
        else { create(playerid); }
       
        return 1;
}
public OnPlayerDisconnect( playerid, reason ) {
        #pragma unused reason
       
        Save(playerid);
       
        return 1;
}
public OnFilterScriptInit( )
{
        printf( \"[Fl0rian] Jármû vásárlás - BETÖLTVE\" );
        KocsikBetolt( );
        Pickup = CreatePickup( 1239, 1, P_X, P_Y, P_Z );
        return 1;
}
public OnFilterScriptExit( )
{
        printf( \"[Fl0rian] Jármû vásárlás - LEÁLLÍTVA\" );
        DestroyPickup( Pickup );
        return 1;
}
public OnPlayerPickUpPickup( playerid, pickupid )
{
        if( pickupid == Pickup )
        {
                if( pInfo[playerid][Kocsi] == 1 ) return SendClientMessage( playerid, 0xff0000AA, \"Neked már van autód!\" );
                SetPlayerPos( playerid, P_X+1, P_Y+1, P_Z );
                new dialText[512 + 1];
                new tmp[64 + 1];
                for( new i; i < sizeof JarmuAdat; i++ )
                {
                        format( tmp, sizeof tmp, \"Jármû: %s | Ára: $%d\", GetVehicleModelName(JarmuAdat[0]), JarmuAdat[1] );
                        strins( dialText, tmp, strlen(dialText) );
                        format( Mentes, 64, \"%s\", GetVehicleModelName(JarmuAdat[0]) );
                }
                if( !strlen(dialText) ) return 1;
                ShowPlayerDialog( playerid, 1, DIALOG_STYLE_LIST, \"Autó Szalon\", dialText, \"Tovább\", \"Kilépés\" );
        }
        return 1;
}
public OnPlayerStateChange( playerid, newstate, oldstate )
{
        if( newstate == PLAYER_STATE_DRIVER )
        {
                if( GetPlayerVehicleID(playerid) != pInfo[playerid][KocsiID] )
                {
                        RemovePlayerFromVehicle( playerid );
                SendClientMessage( playerid, 0xff0000AA, \"Ez a jármû nem a tiéd!\" );
                }
        }
       
        return 1;
       
}
public OnPlayerExitVehicle( playerid, vehicleid )
{
        if( GetPlayerState(playerid) == PLAYER_STATE_DRIVER && vehicleid == pInfo[playerid][Kocsi] )
        {
            new vname[64 + 1];
            format( vname, 64, \"%03d.dat\", vehicleid );
                new File: vfile = fopen(vname);
                #define LustaVagyok(%0) vInfo[pInfo[playerid][KocsiID]][%0]
                if( vfile )
                {
                        new vstring[128 + 1];
                format( vstring, 128, \"%f,%f,%f,%f,%d,%d,%d,%s\", LustaVagyok(xpos), LustaVagyok(ypos), LustaVagyok(zpos), LustaVagyok(rot), LustaVagyok(color1), LustaVagyok(color2), LustaVagyok(model), LustaVagyok(plate) );
                fwrite( vfile, vstring );
                        fclose( vfile );
            }
        }
        return 1;
       
}
public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[] )
{
        switch( dialogid )
        {
                case 1:
                {
            new veh;
                        if( GetPlayerMoney(playerid) < JarmuAdat[listitem][1] ) return SendClientMessage( playerid, 0xff0000AA, \"Nincs pénzed erre a jármûre!\" );
                        IdeigID[playerid] = GetVehicleIDFromName( Mentes[listitem] );
                        new rand1 = random(255);
                        new rand2 = random(255);
            veh = CreateVehicle( IdeigID[playerid], KI_X, KI_Y, KI_Z, KI_ROT, rand1, rand2, 0 );
                        pInfo[playerid][Kocsi] = 1;
                        pInfo[playerid][KocsiID] = veh;
                        vInfo[veh][xpos] = KI_X;
            vInfo[veh][ypos] = KI_Y;
            vInfo[veh][zpos] = KI_Z;
            vInfo[veh][rot] = KI_ROT;
            vInfo[veh][color1] = rand1;
            vInfo[veh][color2] = rand2;
            vInfo[veh][model] = IdeigID[playerid];
                        Privat[veh] = true;
                        IdeigID[playerid] = -1;
                        new vname[64 + 1];
            format( vname, 64, \"%03d.dat\", veh );
                        new File: vfile = fopen(vname);
                        #undef LustaVagyok
                        #define LustaVagyok(%0) vInfo[veh][%0]
                        if( vfile )
                        {
                                new vstring[128 + 1];
                format( vstring, 128, \"%f,%f,%f,%f,%d,%d,%d,%s\", LustaVagyok(xpos), LustaVagyok(ypos), LustaVagyok(zpos), LustaVagyok(rot), LustaVagyok(color1), LustaVagyok(color2), LustaVagyok(model), LustaVagyok(plate) );
                fwrite( vfile, vstring );
                                fclose( vfile );
                        }
                        SendClientMessage( playerid, 0x4a7affAA, \"Sikeresen megvetted a jármûvet!\" );
                }
        }
        return 0;
       
}
CMD:stats(playerid, params[])
{
        new str[128 + 1];
       
        format( str, sizeof(str), \"Kocsi ID: %d\", pInfo[playerid][KocsiID] );
    SendClientMessage( playerid, -1, str );
        return 1;
}
CMD:parkol(playerid, params[])
{
        if( !IsPlayerInAnyVehicle(playerid) ) return SendClientMessage( playerid, -1, \"Nem ülsz semmilyen jármûben\" ), 1;
       
        OnPlayerExitVehicle( playerid, GetPlayerVehicleID(playerid) );
       
        return 1;
}
stock KocsikBetolt()
{
        new string[256 + 1];
    new dest[8][64 + 1];
    for( new veh = 0; veh < MAX_VEHICLES; veh++ )
        {
            new vname[64 + 1];
            format( vname, 64, \"%03d.dat\", veh );
        if( fexist(vname) )
                {
                        new File: vfile = fopen(vname, io_read);
                        if( vfile )
                        {
                                fread( vfile, string );
                                split( string, dest, \',\' );
            }
                        new vehi = CreateVehicle( strval(dest[6]), floatstr(dest[0]), floatstr(dest[1]), floatstr(dest[2]), floatstr(dest[3]), strval(dest[4]), strval(dest[5]), 0 );
                        SetVehicleNumberPlate( vehi, dest[7] );
                        vInfo[vehi][xpos] = floatstr(dest[0]);
                        vInfo[vehi][ypos] = floatstr(dest[1]);
                        vInfo[vehi][zpos] = floatstr(dest[2]);
                        vInfo[vehi][rot] = floatstr(dest[3]);
                        vInfo[vehi][color1] = strval(dest[4]);
                        vInfo[vehi][color2] = strval(dest[5]);
                        vInfo[vehi][model] = strval(dest[6]);
                        format( vInfo[vehi][plate], 32, \"%s\", dest[7] );
                        printf( \"ID: %d jármû betöltve.\", vehi );
                }
        }
       
        return 1;
       
}
stock split( const strsrc[], strdest[][], delimiter )
{
        new i, li;
        new aNum;
        new len;
        while(i <= strlen(strsrc))
        {
                if(strsrc==delimiter || i==strlen(strsrc))
                {
                        len = strmid(strdest[aNum], strsrc, li, i, 128);
                        strdest[aNum][len] = 0;
                        li = i+1;
                        aNum++;
                }
               
                i++;
               
        }
       
        return 1;
       
}
new VehicleNames[212][] =
{
        {\"Landstalker\"},{\"Bravura\"},{\"Buffalo\"},{\"Linerunner\"},{\"Perennial\"},{\"Sentinel\"},{\"Dumper\"}, {\"Firetruck\"},{\"Trashmaster\"},{\"Stretch\"},{\"Manana\"},{\"Infernus\"},{\"Voodoo\"},{\"Pony\"},{\"Mule\"}, {\"Cheetah\"},{\"Ambulance\"},{\"Leviathan\"},{\"Moonbeam\"},{\"Esperanto\"},{\"Taxi\"},{\"Washington\"}, {\"Bobcat\"},{\"Mr Whoopee\"},{\"BF Injection\"},{\"Hunter\"},{\"Premier\"},{\"Enforcer\"},{\"Securicar\"},
        {\"Banshee\"},{\"Predator\"},{\"Bus\"},{\"Rhino\"},{\"Barracks\"},{\"Hotknife\"},{\"Trailer 1\"},{\"Previon\"}, {\"Coach\"},{\"Cabbie\"},{\"Stallion\"},{\"Rumpo\"},{\"RC Bandit\"},{\"Romero\"},{\"Packer\"},{\"Monster\"}, {\"Admiral\"},{\"Squalo\"},{\"Seasparrow\"},{\"Pizzaboy\"},{\"Tram\"},{\"Trailer 2\"},{\"Turismo\"}, {\"Speeder\"},{\"Reefer\"},{\"Tropic\"},{\"Flatbed\"},{\"Yankee\"},{\"Caddy\"},{\"Solair\"},{\"Berkley\'s RC Van\"},
        {\"Skimmer\"},{\"PCJ-600\"},{\"Faggio\"},{\"Freeway\"},{\"RC Baron\"},{\"RC Raider\"},{\"Glendale\"},{\"Oceanic\"}, {\"Sanchez\"},{\"Sparrow\"},{\"Patriot\"},{\"Quad\"},{\"Coastguard\"},{\"Dinghy\"},{\"Hermes\"},{\"Sabre\"}, {\"Rustler\"},{\"ZR-350\"},{\"Walton\"},{\"Regina\"},{\"Comet\"},{\"BMX\"},{\"Burrito\"},{\"Camper\"},{\"Marquis\"}, {\"Baggage\"},{\"Dozer\"},{\"Maverick\"},{\"News Chopper\"},{\"Rancher\"},{\"FBI Rancher\"},{\"Virgo\"},{\"Greenwood\"},
        {\"Jetmax\"},{\"Hotring\"},{\"Sandking\"},{\"Blista Compact\"},{\"Police Maverick\"},{\"Boxville\"},{\"Benson\"}, {\"Mesa\"},{\"RC Goblin\"},{\"Hotring Racer A\"},{\"Hotring Racer B\"},{\"Bloodring Banger\"},{\"Rancher\"}, {\"Super GT\"},{\"Elegant\"},{\"Journey\"},{\"Bike\"},{\"Mountain Bike\"},{\"Beagle\"},{\"Cropdust\"},{\"Stunt\"},
        {\"Tanker\"}, {\"Roadtrain\"},{\"Nebula\"},{\"Majestic\"},{\"Buccaneer\"},{\"Shamal\"},{\"Hydra\"},{\"FCR-900\"}, {\"NRG-500\"},{\"HPV1000\"},{\"Cement Truck\"},{\"Tow Truck\"},{\"Fortune\"},{\"Cadrona\"},{\"FBI Truck\"}, {\"Willard\"},{\"Forklift\"},{\"Tractor\"},{\"Combine\"},{\"Feltzer\"},{\"Remington\"},{\"Slamvan\"},
        {\"Blade\"},{\"Freight\"},{\"Streak\"},{\"Vortex\"},{\"Vincent\"},{\"Bullet\"},{\"Clover\"},{\"Sadler\"}, {\"Firetruck LA\"},{\"Hustler\"},{\"Intruder\"},{\"Primo\"},{\"Cargobob\"},{\"Tampa\"},{\"Sunrise\"},{\"Merit\"}, {\"Utility\"},{\"Nevada\"},{\"Yosemite\"},{\"Windsor\"},{\"Monster A\"},{\"Monster B\"},{\"Uranus\"},{\"Jester\"},
        {\"Sultan\"},{\"Stratum\"},{\"Elegy\"},{\"Raindance\"},{\"RC Tiger\"},{\"Flash\"},{\"Tahoma\"},{\"Savanna\"}, {\"Bandito\"},{\"Freight Flat\"},{\"Streak Carriage\"},{\"Kart\"},{\"Mower\"},{\"Duneride\"},{\"Sweeper\"}, {\"Broadway\"},{\"Tornado\"},{\"AT-400\"},{\"DFT-30\"},{\"Huntley\"},{\"Stafford\"},{\"BF-400\"},{\"Newsvan\"}, {\"Tug\"},{\"Trailer 3\"},{\"Emperor\"},{\"Wayfarer\"},{\"Euros\"},{\"Hotdog\"},{\"Club\"},{\"Freight Carriage\"},
        {\"Trailer 3\"},{\"Andromada\"},{\"Dodo\"},{\"RC Cam\"},{\"Launch\"},{\"Police Car (LSPD)\"},{\"Police Car (SFPD)\"}, {\"Police Car (LVPD)\"},{\"Police Ranger\"},{\"Picador\"},{\"S.W.A.T. Van\"},{\"Alpha\"},{\"Phoenix\"},{\"Glendale\"}, {\"Sadler\"},{\"Luggage Trailer A\"},{\"Luggage Trailer B\"},{\"Stair Trailer\"},{\"Boxville\"},{\"Farm Plow\"}, {\"Utility Trailer\"}
};
stock GetVehicleIDFromName( vehiclename[], type = 0 )
{
        new integer = INVALID_VEHICLE_ID;
        new talalat;
        if( type == 0 )
        {
                for( new i = 0; i < 212; i++ )
                {
                        if( strfind(VehicleNames[0], vehiclename, true ) != -1 )
                        {
                integer = i + 400;
                talalat++;
                        }
                }
        }
        else
        {
                for( new i = 0; i < 212; i++ )
                {
                        if( strcmp(VehicleNames[0], vehiclename, true ) == 0 )
                        {
                                integer = i + 400;
                talalat++;
                        }
                }
        }
        if( talalat > 1 )
        {
                printf( \"Több találat a következõre: \'%s\'\", vehiclename );
                return INVALID_VEHICLE_ID;
        }
        if( talalat == 0 )
        {
                printf( \"Nincs találat a következõre: \'%s\'\", vehiclename );
        }
        return integer;
}
 
stock GetVehicleModelName( modell )
{
    new STRING[64 + 1];
    format( STRING, 64, \"%s\", VehicleNames[modell - 400][0] );
    return STRING;
}

258
Segítségkérés / Vontatás
« Dátum: 2012. szeptember 13. - 17:21:00 »
A 9-es sorhoz nem tetél semmit ezért nem kell a visszatérés a többi meg soreltolódás tedd be ezt:
#pragma tabsize 0

259
Bemutatkozás / [Bemutatkozás]Hesfelán Tivadar
« Dátum: 2012. szeptember 13. - 15:25:38 »
Tudtam, hogy ismerõs vagy te már voltál itt. http://sampforum.hu/index.php?topic=17252.0

260
Általános / Összes MTA verzió egy helyen
« Dátum: 2012. szeptember 13. - 12:42:23 »
A linux servert nem teszed fel?

261
Segítségkérés / Ezt dobta a pawno O.o
« Dátum: 2012. szeptember 13. - 12:35:45 »
Ez  tájékoztatás. Milyen pawnod van?

262
Segítségkérés / Pozíció elmentése kilépsnél
« Dátum: 2012. szeptember 12. - 21:31:32 »
Idézetet írta: Mokus date=1347470985\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"27604\" data-ipsquote-contentclass=\"forums_Topic
Tessék.
 
new Float:x[MAX_PLAYERS],Float:y[MAX_PLAYERS],Float:z[MAX_PLAYERS];
enum pInfo
{
pPozicio,
}
public OnPlayerDisconnect(playerid, reason)
{
        dini_IntSet(file,\"Pozicio\",GetPlayerPos(playerid,x[playerid],y[playerid],z[playerid]));
}
//register parancs alá
        dini_IntSet(file,\"Pozicio\",GetPlayerPos(playerid,x[playerid],y[playerid],z[playerid]));
//login parancs alá
         SetPlayerPos(playerid,x[playerid],y[playerid],z[playerid]);

 

FloatSet kell.

263
Segítségkérés / PVarInt jármü id létrehozás
« Dátum: 2012. szeptember 12. - 20:51:09 »
Csinálsz változót azoknak a jármûveknek és csak azokat véded le.

264
Segítségkérés / Pozició mentés.
« Dátum: 2012. szeptember 12. - 14:40:05 »
public OnPlayerSpawn(playerid)
{
new name[MAX_PLAYER_NAME];
              new
                 Float:fPos[ 3 ],
                 Interior;
                 new file[128];
        GetPlayerName( playerid, name, MAX_PLAYER_NAME );
        format( file, sizeof( file ), \"pos/%s.ini\", name );
        if( dini_Exists( file ) )
        {
           fPos[ 0 ] = dini_Float( file, \"KooX\" );
           fPos[ 1 ] = dini_Float( file, \"KooY\" );
           fPos[ 2 ] = dini_Float( file, \"KooZ\" );
   Interior = dini_Int(file, \"KooI\");
           SetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] );
   SetPlayerInterior(playerid, Interior);
        }
        else
        {
           SetPlayerPos( playerid, //ahol kezd);
           SetPlayerInterior(playerid, 0);
        }
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new name[MAX_PLAYER_NAME];
             new
                 Float:fPos[ 3 ],
                 Interior;
Interior = GetPlayerInterior(playerid);
        GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] );
        GetPlayerName( playerid, name, MAX_PLAYER_NAME );
        format( file, sizeof( file ), \"pos/%s.ini\", name );
        if( !dini_Exists( file ) )
        {
          dini_Create( file );
          dini_FloatSet(file, \"KooX\", fPos[ 0 ] );
          dini_FloatSet(file, \"KooY\", fPos[ 1 ] );
          dini_FloatSet(file, \"KooZ\", fPos[ 2 ] );
          dini_IntSet(file, \"KooI\", Interior);
        }
        else
        {
          dini_FloatSet(file, \"KooX\", fPos[ 0 ] );
          dini_FloatSet(file, \"KooY\", fPos[ 1 ] );
          dini_FloatSet(file, \"KooZ\", fPos[ 2 ] );
          dini_IntSet(file, \"KooI\", Interior);
        }
return 1;
}

265
Segítségkérés / Nem ment
« Dátum: 2012. szeptember 12. - 11:07:33 »
Én így oldanám meg:
 
       dini_IntSet(fajl,\"penz\",GetPlayerMoney(playerid));
   dini_IntSet(fajl,\"pont\",GetPlayerScore(playerid));

 
És a betöltés:
 
      GivePlayerMoney(playerid,dini_Int(fajl,\"penz\"));
SetPlayerScore(playerid,dini_Int(fajl,\"pont\"));

 
És még valami ne használj dcmdt és zcmdt egyszerre mert nem szeretik egymást.

266
Archívum / Takistan RP [Frissítve: 2012.09.13.]
« Dátum: 2012. szeptember 11. - 19:45:26 »
Ez valami háborús rp lesz?

267
Segítségkérés / zcmd ékezetes parancs
« Dátum: 2012. szeptember 11. - 16:51:24 »
Szerintem nem mert a zcmd angol ezért nem ékezetesre volt csinálva.

268
Szkript kérések / Munka Script Kérés
« Dátum: 2012. szeptember 11. - 16:44:20 »

269
RP/RPG kérések / Report
« Dátum: 2012. szeptember 11. - 16:27:19 »
/*  
*  Version: MPL 1.1

*  The contents of this file are subject to the Mozilla Public License Version
*  1.1 (the \"License\"); you may not use this file except in compliance with
*  the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/

*  Software distributed under the License is distributed on an \"AS IS\" basis,
*  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
*  for the specific language governing rights and limitations under the
*  License.

*  The Original Code is the sscanf 2.0 SA:MP plugin.

*  The Initial Developer of the Original Code is Alex \"Y_Less\" Cole.
*  Portions created by the Initial Developer are Copyright (C) 2010
*  the Initial Developer. All Rights Reserved.

*  Contributor(s):

*  Special Thanks to:

*  SA:MP Team past, present and future
*/
#define SSCANF:%0(%1) sscanf_%0(%1);public sscanf_%0(%1)
#if defined sscanf
#error sscanf (possibly the PAWN version) already defined.
#endif
native sscanf(const data[], const format[], {Float,_}:...);
native unformat(const data[], const format[], {Float,_}:...) = sscanf;
native SSCANF_Init(players, invalid, len);
native SSCANF_Join(playerid, const name[], npc);
native SSCANF_Leave(playerid);
static stock
SSCANF_gInit = 0xFFFFFFFF,
SSCANF_gOPC,
SSCANF_gOPDC;
public OnFilterScriptInit()
{
printf(\"OnFilter\");
SSCANF_Init(GetMaxPlayers(), INVALID_PLAYER_ID, MAX_PLAYER_NAME);
SSCANF_gInit = funcidx(\"SSCANF_OnGameModeInit\") != -1;
SSCANF_gOPC  = funcidx(\"SSCANF_OnPlayerConnect\") != -1;
SSCANF_gOPDC = funcidx(\"SSCANF_OnPlayerDisconnect\") != -1;
return CallLocalFunction(\"SSCANF_OnFilterScriptInit\", \"\");
}
#if defined _ALS_OnFilterScriptInit
#undef OnFilterScriptInit
#else
#define _ALS_OnFilterScriptInit
#endif
#define OnFilterScriptInit SSCANF_OnFilterScriptInit
forward OnFilterScriptInit();
public OnGameModeInit()
{
printf(\"OnGameo\");
if (SSCANF_gInit == -1)
{
SSCANF_Init(GetMaxPlayers(), INVALID_PLAYER_ID, MAX_PLAYER_NAME);
SSCANF_gInit = funcidx(\"SSCANF_OnGameModeInit\") != -1;
SSCANF_gOPC  = funcidx(\"SSCANF_OnPlayerConnect\") != -1;
SSCANF_gOPDC = funcidx(\"SSCANF_OnPlayerDisconnect\") != -1;
}
if (SSCANF_gInit)
{
// Can\'t do the clever assembly version without y_amx.
/*#emit PUSH.S   reason
#emit PUSH.S   playerid
#emit PUSH.C   8
#emit LCTRL    6
#emit ADD.C    28
#emit PUSH.pri
#emit LOAD.pri SSCANF_gOPDC
#emit SCTRL    6
#emit RETN*/
return CallLocalFunction(\"SSCANF_OnGameModeInit\", \"\");
}
return 1;
}
#if defined _ALS_OnGameModeInit
#undef OnGameModeInit
#else
#define _ALS_OnGameModeInit
#endif
#define OnGameModeInit SSCANF_OnGameModeInit
forward OnGameModeInit();
public OnPlayerConnect(playerid)
{
new
name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
SSCANF_Join(playerid, name, IsPlayerNPC(playerid));
if (SSCANF_gOPDC)
{
/*#emit PUSH.S   playerid
#emit PUSH.C   4
#emit LCTRL    6
#emit ADD.C    28
#emit PUSH.pri
#emit LOAD.pri SSCANF_gOPC
#emit SCTRL    6
#emit RETN*/
return CallLocalFunction(\"SSCANF_OnPlayerConnect\", \"i\", playerid);
}
return 1;
}
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect SSCANF_OnPlayerConnect
forward OnPlayerConnect(playerid);
public OnPlayerDisconnect(playerid, reason)
{
new
ret = 1;
if (SSCANF_gOPDC)
{
/*#emit PUSH.S   reason
#emit PUSH.S   playerid
#emit PUSH.C   8
#emit LCTRL    6
#emit ADD.C    28
#emit PUSH.pri
#emit LOAD.pri SSCANF_gOPDC
#emit SCTRL    6
#emit RETN*/
ret = CallLocalFunction(\"SSCANF_OnPlayerDisconnect\", \"ii\", playerid, reason);
}
SSCANF_Leave(playerid);
return ret;
}
#if defined _ALS_OnPlayerDisconnect
#undef OnPlayerDisconnect
#else
#define _ALS_OnPlayerDisconnect
#endif
#define OnPlayerDisconnect SSCANF_OnPlayerDisconnect
forward OnPlayerDisconnect(playerid, reason);
#define SSCANF_Init
#define SSCANF_Join
#define SSCANF_Leave
#define extract%0->%1; EXTRN%1;unformat(_:EXTRZ:EXTRX:%0,##,%1,,);
#define unformat(_:EXTRZ:EXTRX:%0,##,%1);%2else%3; if (unformat(_:EXTRX:%0,##,%1))%3;
#define EXTRX:%0##,%9new%1,%2) EXTRY:%0##,|||%1|||%2)
#define EXTRY: EXTR8:EXTR9:EXTR0:EXTR1:EXTR2:EXTR3:EXTR4:
#define EXTR8:EXTR9:EXTR0:EXTR1:EXTR2:EXTR3:EXTR4:%0##%1,%2|||%6:%3=%9|||%4) %6_EXTRO:%0##%1,%2|||%3=%9|||%4)
#define EXTR9:EXTR0:EXTR1:EXTR2:EXTR3:EXTR4:%0##%1,%2|||%3=%9|||%4) __EXTRO:%0##%1,%2|||%3=%9|||%4)
#define EXTR0:EXTR1:EXTR2:EXTR3:EXTR4:%0##%1,%2|||%6:%3[%7]|||%4) %6_EXTRW:%0##%1,%2|||%3[%7]|||%4)
#define EXTR1:EXTR2:EXTR3:EXTR4:%0##%1,%2|||%3[%7]|||%4) __EXTRW:%0##%1,%2|||%3|||%4)
#define EXTR2:EXTR3:EXTR4:%0##%1,%2|||%6:%3|||%4) %6_EXTRN:%0##%1,%2|||%3|||%4)
#define EXTR3:EXTR4:%0##%1,,%2||||||%4) %0##%1,%2)
#define EXTR4:%0##%1,%2|||%3|||%4) __EXTRN:%0##%1,%2|||%3|||%4)
// Optional specifiers.
#define __EXTRO:%0##%1,%2|||%3=%9|||%4,%5) EXTRY:%0##%1I\"(\"#%9\")\"#,%2,%3|||%4|||%5)
#define Float_EXTRO:%0##%1,%2|||%3=%9|||%4,%5) EXTRY:%0##%1F\"(\"#%9\")\"#,%2,%3|||%4|||%5)
#define player_EXTRO:%0##%1,%2|||%3=%9|||%4,%5) EXTRY:%0##%1U\"(\"#%9\")\"#,%2,%3|||%4|||%5)
#define string_EXTRO:%0##%1,%2|||%3[%7]=%9|||%4,%5) EXTRY:%0##%1S\"(\"#%9\")\"#[%7],%2,%3|||%4|||%5)
// Normal specifiers (the double underscore is to work for \"_:\".
#define __EXTRN:%0##%1,%2|||%3|||%4,%5) EXTRY:%0##%1i,%2,%3|||%4|||%5)
#define Float_EXTRN:%0##%1,%2|||%3|||%4,%5) EXTRY:%0##%1f,%2,%3|||%4|||%5)
#define player_EXTRN:%0##%1,%2|||%3|||%4,%5) EXTRY:%0##%1u,%2,%3|||%4|||%5)
//#define string_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1s[%7],%2,%3|||%4|||%5)
// Array versions of normal specifiers.
#define __EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1a<i>[%7],%2,%3|||%4|||%5)
#define Float_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1a<f>[%7],%2,%3|||%4|||%5)
#define player_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1a<u>[%7],%2,%3|||%4|||%5)
#define string_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1s[%7],%2,%3|||%4|||%5)
// Get rid of excess leading space which causes warnings.
#define EXTRN%0new%1; new%1;
#if !defined string
#define string:
#endif
#define player:
#define hex:
#define hex_EXTRO:%0##%1,%2|||%3=%9|||%4,%5) EXTRY:%0##%1H\"(\"#%9\")\"#,%2,%3|||%4|||%5)
#define hex_EXTRN:%0##%1,%2|||%3|||%4,%5) EXTRY:%0##%1h,%2,%3|||%4|||%5)
#define hex_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1a<h>[%7],%2,%3|||%4|||%5)
#define bin:
#define bin_EXTRO:%0##%1,%2|||%3=%9|||%4,%5) EXTRY:%0##%1B\"(\"#%9\")\"#,%2,%3|||%4|||%5)
#define bin_EXTRN:%0##%1,%2|||%3|||%4,%5) EXTRY:%0##%1b,%2,%3|||%4|||%5)
#define bin_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1a<b>[%7],%2,%3|||%4|||%5)
#define kustom:%0<%1> %0
#define kustom_EXTRO:%0##%1,%2|||%3<%8>=%9|||%4,%5) EXTRY:%0##%1K<%8>\"(\"#%9\")\"#,%2,%3|||%4|||%5)
#define kustom_EXTRN:%0##%1,%2|||%3<%8>|||%4,%5) EXTRY:%0##%1k<%8>,%2,%3|||%4|||%5)
//#define bin_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1a<b>[%7],%2,%3|||%4|||%5)
SSCANF:weapon(string[])
{
// This function is VERY basic, needs VASTLY improving to detect variations.
if (\'0\' <= string[0] <= \'9\')
{
new
   ret = strval(string);
if (0 <= ret <= 18 || 22 <= ret <= 46)
{
   return ret;
}
}
else if (!strcmp(string, \"Unarmed\")) return 0;
else if (!strcmp(string, \"Brass Knuckles\")) return 1;
else if (!strcmp(string, \"Golf Club\")) return 2;
else if (!strcmp(string, \"Night Stick\")) return 3;
else if (!strcmp(string, \"Knife\")) return 4;
else if (!strcmp(string, \"Baseball Bat\")) return 5;
else if (!strcmp(string, \"Shovel\")) return 6;
else if (!strcmp(string, \"Pool cue\")) return 7;
else if (!strcmp(string, \"Katana\")) return 8;
else if (!strcmp(string, \"Chainsaw\")) return 9;
else if (!strcmp(string, \"Purple Dildo\")) return 10;
else if (!strcmp(string, \"White Dildo\")) return 11;
else if (!strcmp(string, \"Long White Dildo\")) return 12;
else if (!strcmp(string, \"White Dildo 2\")) return 13;
else if (!strcmp(string, \"Flowers\")) return 14;
else if (!strcmp(string, \"Cane\")) return 15;
else if (!strcmp(string, \"Grenades\")) return 16;
else if (!strcmp(string, \"Tear Gas\")) return 17;
else if (!strcmp(string, \"Molotovs\")) return 18;
else if (!strcmp(string, \"Pistol\")) return 22;
else if (!strcmp(string, \"Silenced Pistol\")) return 23;
else if (!strcmp(string, \"Desert Eagle\")) return 24;
else if (!strcmp(string, \"Shotgun\")) return 25;
else if (!strcmp(string, \"Sawn Off Shotgun\")) return 26;
else if (!strcmp(string, \"Combat Shotgun\")) return 27;
else if (!strcmp(string, \"Micro Uzi\")) return 28;
else if (!strcmp(string, \"Mac 10\")) return 28;
else if (!strcmp(string, \"MP5\")) return 29;
else if (!strcmp(string, \"AK47\")) return 30;
else if (!strcmp(string, \"M4\")) return 31;
else if (!strcmp(string, \"Tec9\")) return 32;
else if (!strcmp(string, \"Rifle\")) return 33;
else if (!strcmp(string, \"Sniper Rifle\")) return 34;
else if (!strcmp(string, \"RPG\")) return 35;
else if (!strcmp(string, \"Missile Launcher\")) return 36;
else if (!strcmp(string, \"Flame Thrower\")) return 37;
else if (!strcmp(string, \"Minigun\")) return 38;
else if (!strcmp(string, \"Sachel Charges\")) return 39;
else if (!strcmp(string, \"Detonator\")) return 40;
else if (!strcmp(string, \"Spray Paint\")) return 41;
else if (!strcmp(string, \"Fire Extinguisher\")) return 42;
else if (!strcmp(string, \"Camera\")) return 43;
else if (!strcmp(string, \"Nightvision Goggles\")) return 44;
else if (!strcmp(string, \"Thermal Goggles\")) return 45;
else if (!strcmp(string, \"Parachute\")) return 46;
return -1;
}
SSCANF:vehicle(string[])
{
// This function is VERY basic, needs VASTLY improving to detect variations.
if (\'0\' <= string[0] <= \'9\')
{
new
   ret = strval(string);
if (400 <= ret <= 611)
{
   return ret;
}
}
else if (!strcmp(string, \"Landstalker\")) return 400;
else if (!strcmp(string, \"Bravura\")) return 401;
else if (!strcmp(string, \"Buffalo\")) return 402;
else if (!strcmp(string, \"Linerunner\")) return 403;
else if (!strcmp(string, \"Perenniel\")) return 404;
else if (!strcmp(string, \"Sentinel\")) return 405;
else if (!strcmp(string, \"Dumper\")) return 406;
else if (!strcmp(string, \"Firetruck\")) return 407;
else if (!strcmp(string, \"Trashmaster\")) return 408;
else if (!strcmp(string, \"Stretch\")) return 409;
else if (!strcmp(string, \"Manana\")) return 410;
else if (!strcmp(string, \"Infernus\")) return 411;
else if (!strcmp(string, \"Voodoo\")) return 412;
else if (!strcmp(string, \"Pony\")) return 413;
else if (!strcmp(string, \"Mule\")) return 414;
else if (!strcmp(string, \"Cheetah\")) return 415;
else if (!strcmp(string, \"Ambulance\")) return 416;
else if (!strcmp(string, \"Leviathan\")) return 417;
else if (!strcmp(string, \"Moonbeam\")) return 418;
else if (!strcmp(string, \"Esperanto\")) return 419;
else if (!strcmp(string, \"Taxi\")) return 420;
else if (!strcmp(string, \"Washington\")) return 421;
else if (!strcmp(string, \"Bobcat\")) return 422;
else if (!strcmp(string, \"Mr Whoopee\")) return 423;
else if (!strcmp(string, \"BF Injection\")) return 424;
else if (!strcmp(string, \"Hunter\")) return 425;
else if (!strcmp(string, \"Premier\")) return 426;
else if (!strcmp(string, \"Enforcer\")) return 427;
else if (!strcmp(string, \"Securicar\")) return 428;
else if (!strcmp(string, \"Banshee\")) return 429;
else if (!strcmp(string, \"Predator\")) return 430;
else if (!strcmp(string, \"Bus\")) return 431;
else if (!strcmp(string, \"Rhino\")) return 432;
else if (!strcmp(string, \"Barracks\")) return 433;
else if (!strcmp(string, \"Hotknife\")) return 434;
else if (!strcmp(string, \"Article Trailer\")) return 435;
else if (!strcmp(string, \"Previon\")) return 436;
else if (!strcmp(string, \"Coach\")) return 437;
else if (!strcmp(string, \"Cabbie\")) return 438;
else if (!strcmp(string, \"Stallion\")) return 439;
else if (!strcmp(string, \"Rumpo\")) return 440;
else if (!strcmp(string, \"RC Bandit\")) return 441;
else if (!strcmp(string, \"Romero\")) return 442;
else if (!strcmp(string, \"Packer\")) return 443;
else if (!strcmp(string, \"Monster\")) return 444;
else if (!strcmp(string, \"Admiral\")) return 445;
else if (!strcmp(string, \"Squallo\")) return 446;
else if (!strcmp(string, \"Seasparrow\")) return 447;
else if (!strcmp(string, \"Pizzaboy\")) return 448;
else if (!strcmp(string, \"Tram\")) return 449;
else if (!strcmp(string, \"Article Trailer 2\")) return 450;
else if (!strcmp(string, \"Turismo\")) return 451;
else if (!strcmp(string, \"Speeder\")) return 452;
else if (!strcmp(string, \"Reefer\")) return 453;
else if (!strcmp(string, \"Tropic\")) return 454;
else if (!strcmp(string, \"Flatbed\")) return 455;
else if (!strcmp(string, \"Yankee\")) return 456;
else if (!strcmp(string, \"Caddy\")) return 457;
else if (!strcmp(string, \"Solair\")) return 458;
else if (!strcmp(string, \"Berkley\'s RC Van\")) return 459;
else if (!strcmp(string, \"Skimmer\")) return 460;
else if (!strcmp(string, \"PCJ-600\")) return 461;
else if (!strcmp(string, \"Faggio\")) return 462;
else if (!strcmp(string, \"Freeway\")) return 463;
else if (!strcmp(string, \"RC Baron\")) return 464;
else if (!strcmp(string, \"RC Raider\")) return 465;
else if (!strcmp(string, \"Glendale\")) return 466;
else if (!strcmp(string, \"Oceanic\")) return 467;
else if (!strcmp(string, \"Sanchez\")) return 468;
else if (!strcmp(string, \"Sparrow\")) return 469;
else if (!strcmp(string, \"Patriot\")) return 470;
else if (!strcmp(string, \"Quad\")) return 471;
else if (!strcmp(string, \"Coastguard\")) return 472;
else if (!strcmp(string, \"Dinghy\")) return 473;
else if (!strcmp(string, \"Hermes\")) return 474;
else if (!strcmp(string, \"Sabre\")) return 475;
else if (!strcmp(string, \"Rustler\")) return 476;
else if (!strcmp(string, \"ZR-350\")) return 477;
else if (!strcmp(string, \"Walton\")) return 478;
else if (!strcmp(string, \"Regina\")) return 479;
else if (!strcmp(string, \"Comet\")) return 480;
else if (!strcmp(string, \"BMX\")) return 481;
else if (!strcmp(string, \"Burrito\")) return 482;
else if (!strcmp(string, \"Camper\")) return 483;
else if (!strcmp(string, \"Marquis\")) return 484;
else if (!strcmp(string, \"Baggage\")) return 485;
else if (!strcmp(string, \"Dozer\")) return 486;
else if (!strcmp(string, \"Maverick\")) return 487;
else if (!strcmp(string, \"SAN News Maverick\")) return 488;
else if (!strcmp(string, \"Rancher\")) return 489;
else if (!strcmp(string, \"FBI Rancher\")) return 490;
else if (!strcmp(string, \"Virgo\")) return 491;
else if (!strcmp(string, \"Greenwood\")) return 492;
else if (!strcmp(string, \"Jetmax\")) return 493;
else if (!strcmp(string, \"Hotring Racer\")) return 494;
else if (!strcmp(string, \"Sandking\")) return 495;
else if (!strcmp(string, \"Blista Compact\")) return 496;
else if (!strcmp(string, \"Police Maverick\")) return 497;
else if (!strcmp(string, \"Boxville\")) return 498;
else if (!strcmp(string, \"Benson\")) return 499;
else if (!strcmp(string, \"Mesa\")) return 500;
else if (!strcmp(string, \"RC Goblin\")) return 501;
else if (!strcmp(string, \"Hotring Racer\")) return 502;
else if (!strcmp(string, \"Hotring Racer\")) return 503;
else if (!strcmp(string, \"Bloodring Banger\")) return 504;
else if (!strcmp(string, \"Rancher\")) return 505;
else if (!strcmp(string, \"Super GT\")) return 506;
else if (!strcmp(string, \"Elegant\")) return 507;
else if (!strcmp(string, \"Journey\")) return 508;
else if (!strcmp(string, \"Bike\")) return 509;
else if (!strcmp(string, \"Mountain Bike\")) return 510;
else if (!strcmp(string, \"Beagle\")) return 511;
else if (!strcmp(string, \"Cropduster\")) return 512;
else if (!strcmp(string, \"Stuntplane\")) return 513;
else if (!strcmp(string, \"Tanker\")) return 514;
else if (!strcmp(string, \"Roadtrain\")) return 515;
else if (!strcmp(string, \"Nebula\")) return 516;
else if (!strcmp(string, \"Majestic\")) return 517;
else if (!strcmp(string, \"Buccaneer\")) return 518;
else if (!strcmp(string, \"Shamal\")) return 519;
else if (!strcmp(string, \"Hydra\")) return 520;
else if (!strcmp(string, \"FCR-900\")) return 521;
else if (!strcmp(string, \"NRG-500\")) return 522;
else if (!strcmp(string, \"HPV1000\")) return 523;
else if (!strcmp(string, \"Cement Truck\")) return 524;
else if (!strcmp(string, \"Towtruck\")) return 525;
else if (!strcmp(string, \"Fortune\")) return 526;
else if (!strcmp(string, \"Cadrona\")) return 527;
else if (!strcmp(string, \"FBI Truck\")) return 528;
else if (!strcmp(string, \"Willard\")) return 529;
else if (!strcmp(string, \"Forklift\")) return 530;
else if (!strcmp(string, \"Tractor\")) return 531;
else if (!strcmp(string, \"Combine Harvester\")) return 532;
else if (!strcmp(string, \"Feltzer\")) return 533;
else if (!strcmp(string, \"Remington\")) return 534;
else if (!strcmp(string, \"Slamvan\")) return 535;
else if (!strcmp(string, \"Blade\")) return 536;
else if (!strcmp(string, \"Freight (Train)\")) return 537;
else if (!strcmp(string, \"Brownstreak (Train)\")) return 538;
else if (!strcmp(string, \"Vortex\")) return 539;
else if (!strcmp(string, \"Vincent\")) return 540;
else if (!strcmp(string, \"Bullet\")) return 541;
else if (!strcmp(string, \"Clover\")) return 542;
else if (!strcmp(string, \"Sadler\")) return 543;
else if (!strcmp(string, \"Firetruck LA\")) return 544;
else if (!strcmp(string, \"Hustler\")) return 545;
else if (!strcmp(string, \"Intruder\")) return 546;
else if (!strcmp(string, \"Primo\")) return 547;
else if (!strcmp(string, \"Cargobob\")) return 548;
else if (!strcmp(string, \"Tampa\")) return 549;
else if (!strcmp(string, \"Sunrise\")) return 550;
else if (!strcmp(string, \"Merit\")) return 551;
else if (!strcmp(string, \"Utility Van\")) return 552;
else if (!strcmp(string, \"Nevada\")) return 553;
else if (!strcmp(string, \"Yosemite\")) return 554;
else if (!strcmp(string, \"Windsor\")) return 555;
else if (!strcmp(string, \"Monster \\\"A\\\"\")) return 556;
else if (!strcmp(string, \"Monster \\\"B\\\"\")) return 557;
else if (!strcmp(string, \"Uranus\")) return 558;
else if (!strcmp(string, \"Jester\")) return 559;
else if (!strcmp(string, \"Sultan\")) return 560;
else if (!strcmp(string, \"Stratum\")) return 561;
else if (!strcmp(string, \"Elegy\")) return 562;
else if (!strcmp(string, \"Raindance\")) return 563;
else if (!strcmp(string, \"RC Tiger\")) return 564;
else if (!strcmp(string, \"Flash\")) return 565;
else if (!strcmp(string, \"Tahoma\")) return 566;
else if (!strcmp(string, \"Savanna\")) return 567;
else if (!strcmp(string, \"Bandito\")) return 568;
else if (!strcmp(string, \"Freight Flat Trailer (Train)\")) return 569;
else if (!strcmp(string, \"Streak Trailer (Train)\")) return 570;
else if (!strcmp(string, \"Kart\")) return 571;
else if (!strcmp(string, \"Mower\")) return 572;
else if (!strcmp(string, \"Dune\")) return 573;
else if (!strcmp(string, \"Sweeper\")) return 574;
else if (!strcmp(string, \"Broadway\")) return 575;
else if (!strcmp(string, \"Tornado\")) return 576;
else if (!strcmp(string, \"AT400\")) return 577;
else if (!strcmp(string, \"DFT-30\")) return 578;
else if (!strcmp(string, \"Huntley\")) return 579;
else if (!strcmp(string, \"Stafford\")) return 580;
else if (!strcmp(string, \"BF-400\")) return 581;
else if (!strcmp(string, \"Newsvan\")) return 582;
else if (!strcmp(string, \"Tug\")) return 583;
else if (!strcmp(string, \"Petrol Trailer\")) return 584;
else if (!strcmp(string, \"Emperor\")) return 585;
else if (!strcmp(string, \"Wayfarer\")) return 586;
else if (!strcmp(string, \"Euros\")) return 587;
else if (!strcmp(string, \"Hotdog\")) return 588;
else if (!strcmp(string, \"Club\")) return 589;
else if (!strcmp(string, \"Freight Box Trailer (Train)\")) return 590;
else if (!strcmp(string, \"Article Trailer 3\")) return 591;
else if (!strcmp(string, \"Andromada\")) return 592;
else if (!strcmp(string, \"Dodo\")) return 593;
else if (!strcmp(string, \"RC Cam\")) return 594;
else if (!strcmp(string, \"Launch\")) return 595;
else if (!strcmp(string, \"Police Car (LSPD)\")) return 596;
else if (!strcmp(string, \"Police Car (SFPD)\")) return 597;
else if (!strcmp(string, \"Police Car (LVPD)\")) return 598;
else if (!strcmp(string, \"Police Ranger\")) return 599;
else if (!strcmp(string, \"Picador\")) return 600;
else if (!strcmp(string, \"S.W.A.T.\")) return 601;
else if (!strcmp(string, \"Alpha\")) return 602;
else if (!strcmp(string, \"Phoenix\")) return 603;
else if (!strcmp(string, \"Glendale Shit\")) return 604;
else if (!strcmp(string, \"Sadler Shit\")) return 605;
else if (!strcmp(string, \"Baggage Trailer \\\"A\\\"\")) return 606;
else if (!strcmp(string, \"Baggage Trailer \\\"B\\\"\")) return 607;
else if (!strcmp(string, \"Tug Stairs Trailer\")) return 608;
else if (!strcmp(string, \"Boxville\")) return 609;
else if (!strcmp(string, \"Farm Trailer\")) return 610;
else if (!strcmp(string, \"Utility Trailer\")) return 611;
return -1;
}
#define sscanf(%0:...) old_sscanf(%0:...)

 
Itt a sscanf2.inc-m lehet segít.

270
RP/RPG kérések / Report
« Dátum: 2012. szeptember 11. - 16:14:25 »
enum pInfo
{
    pAdminLevel
}
new pi[MAX_PLAYERS][pInfo];
CMD:report(playerid, params[])
    {
    new mseg[128],str1[128];
    if(sscanf(params,\"s[128]\",mseg)) return SendClientMessage(playerid,0xFF0000FF, \"Használat: /report [szöveg]\");
    if(pi[playerid][pAdminLevel] >= 1 )
    {
    format(str1,sizeof(str1),\"%s jaelentése %s\",UnderscoreToSpaceName(playerid),mseg);
    SendClientMessage(playerid,-1,str1);
    }
    return 1;
    }
stock UnderscoreToSpaceName(playerid)
{
    new Name0[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
        GetPlayerName(playerid, Name0, sizeof(Name0));
    }
    else
    {
        Name0 = \"Disconnected/Nothing\";
    }
    for(new name0 = 0; name0 < MAX_PLAYER_NAME; name0++) if(Name0[name0] == \'_\') Name0[name0] = \' \';
    return Name0;
}

Oldalak: 1 ... 16 17 [18] 19 20 ... 133
SimplePortal 2.3.7 © 2008-2024, SimplePortal