All pastes #777329 Raw Copy code Copy link Edit

Untitled

public unlisted text v1 · immutable
#777329 ·published 2007-11-16 18:43 UTC
rendered paste body
/*//--------------------------------------------------------------------------//

                        "Test Your Server" Filterscript
                        Creators: LuxurY, Evgeniy
                        Version: 1.2
                        
                        
              										    (c) 2007 LDT
                                                        http://luxury.mybb.ru

//----------------------------------------------------------------------------*/
#pragma tabsize 0
#include <a_samp>

public OnFilterScriptInit() {
new warnings;
new errors;
print(" Test Your Server Filterscript loaded!");
print(" Testing started...");
print(" ___________________________________________________");
print("| Title                 Count    Max    Recomended  |");
print("|___________________________________________________|");
if (VehicleCount() < 10) {
printf(" Vehicles:              [%d]     [700]    [500]",VehicleCount());
}
else if (VehicleCount() < 100) {
printf(" Vehicles:              [%d]    [700]    [500]",VehicleCount());
}
else if (VehicleCount() < 1000) {
printf(" Vehicles:              [%d]   [700]    [500]",VehicleCount());
}
if (VehicleModel() < 10) {
printf(" Types of vehicles:     [%d]     [70]     [50]",VehicleModel());
}
else if (VehicleModel() < 100) {
printf(" Types of vehicles:     [%d]    [70]     [50]",VehicleModel());
}
else if (VehicleModel() < 1000) {
printf(" Types of vehicles:     [%d]   [70]     [50]",VehicleModel());
}
if (ObjectCount() < 10) {
printf(" Objects:               [%d]     [250]    [150]",ObjectCount());
}
else if (ObjectCount() < 100) {
printf(" Objects:               [%d]    [250]    [150]",ObjectCount());
}
else if (ObjectCount() < 1000) {
printf(" Objects:               [%d]   [250]    [150]",ObjectCount());
}
if (PickupCount() < 10) {
printf(" Pickups:               [%d]     [400]    [250]",PickupCount());
}
else if (PickupCount() < 100) {
printf(" Pickups:               [%d]    [400]    [250]",PickupCount());
}
else if (PickupCount() < 1000) {
printf(" Pickups:               [%d]   [400]    [250]",PickupCount());
}
if (OnlinePlayers() < 10) {
printf(" Online players:        [%d]     [200]    [200]",OnlinePlayers());
}
else if (OnlinePlayers() < 100) {
printf(" Online players:        [%d]    [200]    [200]",OnlinePlayers());
}
else if (OnlinePlayers() < 1000) {
printf(" Online players:        [%d]   [200]    [200]",OnlinePlayers());
}
if (GetMaxPlayers() < 10) {
printf(" Max players:           [%d]     [200]    [200]",GetMaxPlayers());
}
else if (GetMaxPlayers() < 100) {
printf(" Max players:           [%d]    [200]    [200]",GetMaxPlayers());
}
else if (GetMaxPlayers() < 1000) {
printf(" Max players:           [%d]   [200]    [200]",GetMaxPlayers());
}
if (TextDrawCount() < 10) {
printf(" TextDraw:              [%d]     [96]     [50]",TextDrawCount());
}
else if (TextDrawCount() < 100) {
printf(" TextDraw:              [%d]    [96]     [50]",TextDrawCount());
}
else if (TextDrawCount() < 1000) {
printf(" TextDraw:              [%d]   [96]     [50]",TextDrawCount());
}
if (GangZoneCount() < 10) {
printf(" GangZone:              [%d]     [1024]   [100]",GangZoneCount());
}
else if (GangZoneCount() < 100) {
printf(" GangZone:              [%d]    [1024]   [100]",GangZoneCount());
}
else if (GangZoneCount() < 1000) {
printf(" GangZone:              [%d]   [1024]   [100]",GangZoneCount());
}
else if (GangZoneCount() < 10000) {
printf(" GangZone:              [%d]  [1024]   [100]",GangZoneCount());
}
if (MenuCount() < 10) {
printf(" Menu:                  [%d]     [128]    [50]",MenuCount());
}
else if (MenuCount() < 100) {
printf(" Menu:                  [%d]    [128]    [50]",MenuCount());
}
else if (MenuCount() < 1000) {
printf(" Menu:                  [%d]   [128]    [50]",MenuCount());
}
print(" ___________________________________________________\n");
print("              Errors and Warnings:");
print(" ___________________________________________________");
if (VehicleCount() > 700) {
errors++;
print(" Error: Count of vehicles must be not more than 700");
}
else if (VehicleCount() > 500) {
warnings++;
print(" Warning: Recomended count of vehicles is 500");
}
if (VehicleModel() > 70) {
errors++;
print(" Error: Count of types of vehicles must be not more than 70");
}
else if (VehicleModel() > 50) {
warnings++;
print(" Warning: Recomended count of types of vehicles is 50");
}
if (ObjectCount() > 250) {
errors++;
print(" Error: Count of objects must be not more than 250");
}
else if (ObjectCount() > 150) {
warnings++;
print(" Warning: Recomended count of objects is 150");
}
if (PickupCount() > 400) {
errors++;
print(" Error: Count of pickups must be not more than 400");
}
else if (PickupCount() > 250) {
warnings++;
print(" Warning: Recomended count of pickups is 250");
}
if (TextDrawCount() > 96) {
errors++;
print(" Error: Count of TextDraw must be not more than 96");
}
else if (TextDrawCount() > 50) {
warnings++;
print(" Warning: Recomended count of TextDraw is 50");
}
if (GangZoneCount() > 1024) {
errors++;
print(" Error: Count of GangZone must be not more than 1024");
}
else if (GangZoneCount() > 100) {
warnings++;
print(" Warning: Recomended count of GangZone is 100");
}
if (MenuCount() > 128) {
errors++;
print(" Error: Count of Menu must be not more than 128");
}
else if (MenuCount() > 150) {
warnings++;
print(" Warning: Recomended count of Menu is 50");
}
print(" ___________________________________________________");
printf("                          Errors: %d Warnings: %d \n",errors,warnings);
print(" The end of testing");
print(" ___________________________________________________");

return 1;
}

stock VehicleModel()
{
	new model[250];
	new nummodel;
	for (new i=1;i<VehicleCount()+1;i++)
	{
model[GetVehicleModel(i)-400]++;
	}

	for (new i=0;i<250;i++)
	{
	    if (model[i]!=0)
	    {
	        nummodel++;
}
	}
	return nummodel;
}


stock VehicleCount()
{
new numcar=CreateVehicle(490,0,0,0,0,0,0,3000);
DestroyVehicle(numcar);
return numcar-1;
}

stock ObjectCount() {
new numo = CreateObject(1245,0,0,1000,0,0,0);
DestroyObject(numo);
return numo-1;
}

stock PickupCount() {
new nump = CreatePickup(371,2,0,0,1000);
DestroyPickup(nump);
return nump;
}

stock TextDrawCount() {
new Text:TT = TextDrawCreate(1,1,"Test");
TextDrawDestroy(TT);
return TT;
}

stock GangZoneCount() {
new cz = GangZoneCreate(3,3,5,5);
GangZoneDestroy(cz);
return cz;
}

stock MenuCount() {
new Menu:cm = CreateMenu("Test",1,2,3,3,3);
DestroyMenu(cm);
return cm-1;
}

stock OnlinePlayers() {
new ol;
for(new i=0; i < MAX_PLAYERS; i++) {
if (IsPlayerConnected(i)) {
ol++;
}}
return ol;
}