05.06.2016, 07:39
as I create a .pwm of createobject and RemoveBuildingForPlayer, to turn it into a filterscript, thanks!
public OnPlayerSpawn(playerid)
{
// RemoveBuildingForPlayer()
return 1;
}
public OnFilterscriptInit()
{
// createobject()
return 1;
}
i think he want to say how to put createobject and removebuildingforplayers in a filterscript
if it is that PHP код:
PHP код:
|
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" MAP 50%");
print("--------------------------------------\n");
return 1;
}
{
CreateObject(10722,26.26270,13.52783, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10722,25.72852,-13.03430, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10722,25.52905,-22.48242, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10722,-7.95605,-21.79263, -13.85931,-90.00000,2.00000,0.81208);
CreateObject(10722,-7.89429,-12.41208, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10722,-8.63525,14.29300, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10847,34.59497,-26.38010, 9.62946,0.00000,0.00000,359.91620);
CreateObject(11244,32.55859,12.82867, 6.52093,0.00000,0.00000,0.00000);
CreateObject(11008,-9.78491,-25.67050, 10.01577,0.00000,0.00000,89.79150);
CreateObject(11326,-24.19165,18.04590, 5.80078,0.00000,0.00000,0.00000);
CreateObject(11327,-9.40356,26.38010, 6.11379,0.00000,0.00000,90.06371);
CreateObject(17523,-13.41528,4.67514, 5.73827,0.00000,0.00000,0.00000);
CreateObject(16146,7.49780,18.20178, 6.50394,0.00000,0.00000,270.06854);
CreateObject(8131,19.38232,-17.49036, 13.85931,0.00000,0.00000,0.00000);
CreateObject(8132,12.97241,-22.70840, 5.89528,0.00000,0.00000,100.76155);
CreateObject(16360,33.93872,-8.65897, 3.52478,0.00000,0.00000,90.00000);
CreateObject(1487,40.83032,-1.71475, 3.60120,0.00000,0.00000,0.00000);
CreateObject(1487,41.31104,-1.49048, 3.60120,0.00000,0.00000,0.00000);
CreateObject(1487,41.11279,-1.38718, 3.60120,0.00000,0.00000,0.00000);
CreateObject(1487,40.83887,-1.48669, 3.60120,0.00000,0.00000,0.00000);
CreateObject(1486,41.10059,-1.71057, 3.50128,0.00000,0.00000,0.00000);
CreateObject(1486,41.20483,-1.61734, 3.50128,0.00000,0.00000,0.00000);
CreateObject(2690,-26.35107,-14.37772, 5.41401,0.00000,0.00000,0.00000);
CreateObject(2690,-26.95410,-14.99847, 5.41401,0.00000,0.00000,0.00000);
CreateObject(1691,-15.44653,4.20587, 7.45306,0.00000,0.00000,0.00000);
CreateObject(1691,-12.79004,21.40845, 9.04884,0.00000,0.00000,46.01675);
CreateObject(18261,16.63208,2.65176, 4.09948,0.00000,0.00000,269.00000);
CreateObject(1372,-1.70557,19.09384, 3.39655,0.00000,0.00000,0.00000);
CreateObject(1372,-0.05933,19.11768, 3.39655,0.00000,0.00000,0.00000);
CreateObject(1372,1.63452,19.09943, 3.39655,0.00000,0.00000,0.00000);
CreateObject(1264,-2.67407,18.62466, 3.90919,0.00000,0.00000,0.00000);
CreateObject(1264,-1.79736,18.27887, 3.80919,0.00000,0.00000,0.00000);
CreateObject(1264,-2.42529,17.76642, 3.80919,0.00000,0.00000,0.00000);
CreateObject(922,34.13599,-4.64258, 4.33294,0.00000,0.00000,0.00000);
return 1;
}
public OnFilterScriptExit()
{
print("\n--------------------------------------");
print(" MAP 100% ");
print("--------------------------------------\n");
return 1;
}
#endif
public OnPlayerSpawn(playerid)
{
RemoveBuildingForPlayer(playerid,10547,-2706.2969,375.5547,3.3828,0.25);
RemoveBuildingForPlayer(playerid,705,-2684.7188,399.3203,3.7734,0.25);
RemoveBuildingForPlayer(playerid,705,-2727.8672,398.9219,3.7734,0.25);
RemoveBuildingForPlayer(playerid,705,-2729.9844,353.9453,3.7734,0.25);
RemoveBuildingForPlayer(playerid,705,-2684.1484,352.6797,3.7734,0.25);
RemoveBuildingForPlayer(playerid,10378,-2706.2969,375.5547,3.3828,0.25);
RemoveBuildingForPlayer(playerid,1231,-2738.7734,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1231,-2730.6484,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1231,-2722.5234,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1231,-2690.0313,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1231,-2681.9063,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1340,-2691.6797,384.4922,4.4844,0.25);
RemoveBuildingForPlayer(playerid,1231,-2673.7813,376.0938,5.9375,0.25);
return 1;
}
#include <a_samp>
#define filterscript
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" MAP 50%");
print("--------------------------------------\n");
CreateObject(10722,26.26270,13.52783, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10722,25.72852,-13.03430, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10722,25.52905,-22.48242, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10722,-7.95605,-21.79263, -13.85931,-90.00000,2.00000,0.81208);
CreateObject(10722,-7.89429,-12.41208, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10722,-8.63525,14.29300, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10847,34.59497,-26.38010, 9.62946,0.00000,0.00000,359.91620);
CreateObject(11244,32.55859,12.82867, 6.52093,0.00000,0.00000,0.00000);
CreateObject(11008,-9.78491,-25.67050, 10.01577,0.00000,0.00000,89.79150);
CreateObject(11326,-24.19165,18.04590, 5.80078,0.00000,0.00000,0.00000);
CreateObject(11327,-9.40356,26.38010, 6.11379,0.00000,0.00000,90.06371);
CreateObject(17523,-13.41528,4.67514, 5.73827,0.00000,0.00000,0.00000);
CreateObject(16146,7.49780,18.20178, 6.50394,0.00000,0.00000,270.06854);
CreateObject(8131,19.38232,-17.49036, 13.85931,0.00000,0.00000,0.00000);
CreateObject(8132,12.97241,-22.70840, 5.89528,0.00000,0.00000,100.76155);
CreateObject(16360,33.93872,-8.65897, 3.52478,0.00000,0.00000,90.00000);
CreateObject(1487,40.83032,-1.71475, 3.60120,0.00000,0.00000,0.00000);
CreateObject(1487,41.31104,-1.49048, 3.60120,0.00000,0.00000,0.00000);
CreateObject(1487,41.11279,-1.38718, 3.60120,0.00000,0.00000,0.00000);
CreateObject(1487,40.83887,-1.48669, 3.60120,0.00000,0.00000,0.00000);
CreateObject(1486,41.10059,-1.71057, 3.50128,0.00000,0.00000,0.00000);
CreateObject(1486,41.20483,-1.61734, 3.50128,0.00000,0.00000,0.00000);
CreateObject(2690,-26.35107,-14.37772, 5.41401,0.00000,0.00000,0.00000);
CreateObject(2690,-26.95410,-14.99847, 5.41401,0.00000,0.00000,0.00000);
CreateObject(1691,-15.44653,4.20587, 7.45306,0.00000,0.00000,0.00000);
CreateObject(1691,-12.79004,21.40845, 9.04884,0.00000,0.00000,46.01675);
CreateObject(18261,16.63208,2.65176, 4.09948,0.00000,0.00000,269.00000);
CreateObject(1372,-1.70557,19.09384, 3.39655,0.00000,0.00000,0.00000);
CreateObject(1372,-0.05933,19.11768, 3.39655,0.00000,0.00000,0.00000);
CreateObject(1372,1.63452,19.09943, 3.39655,0.00000,0.00000,0.00000);
CreateObject(1264,-2.67407,18.62466, 3.90919,0.00000,0.00000,0.00000);
CreateObject(1264,-1.79736,18.27887, 3.80919,0.00000,0.00000,0.00000);
CreateObject(1264,-2.42529,17.76642, 3.80919,0.00000,0.00000,0.00000);
CreateObject(922,34.13599,-4.64258, 4.33294,0.00000,0.00000,0.00000);
return 1;
}
public OnPlayerSpawn(playerid)
{
RemoveBuildingForPlayer(playerid,10547,-2706.2969,375.5547,3.3828,0.25);
RemoveBuildingForPlayer(playerid,705,-2684.7188,399.3203,3.7734,0.25);
RemoveBuildingForPlayer(playerid,705,-2727.8672,398.9219,3.7734,0.25);
RemoveBuildingForPlayer(playerid,705,-2729.9844,353.9453,3.7734,0.25);
RemoveBuildingForPlayer(playerid,705,-2684.1484,352.6797,3.7734,0.25);
RemoveBuildingForPlayer(playerid,10378,-2706.2969,375.5547,3.3828,0.25);
RemoveBuildingForPlayer(playerid,1231,-2738.7734,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1231,-2730.6484,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1231,-2722.5234,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1231,-2690.0313,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1231,-2681.9063,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1340,-2691.6797,384.4922,4.4844,0.25);
RemoveBuildingForPlayer(playerid,1231,-2673.7813,376.0938,5.9375,0.25);
return 1;
}
public OnFilterScriptExit()
{
print("\n--------------------------------------");
print(" MAP 100% ");
print("--------------------------------------\n");
return 1;
}
#endif
public OnGamemodeInit()
{
CreateObject(10722,26.26270,13.52783, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10722,25.72852,-13.03430, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10722,25.52905,-22.48242, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10722,-7.95605,-21.79263, -13.85931,-90.00000,2.00000,0.81208);
CreateObject(10722,-7.89429,-12.41208, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10722,-8.63525,14.29300, -13.75931,-90.00000,2.00000,0.81208);
CreateObject(10847,34.59497,-26.38010, 9.62946,0.00000,0.00000,359.91620);
CreateObject(11244,32.55859,12.82867, 6.52093,0.00000,0.00000,0.00000);
CreateObject(11008,-9.78491,-25.67050, 10.01577,0.00000,0.00000,89.79150);
CreateObject(11326,-24.19165,18.04590, 5.80078,0.00000,0.00000,0.00000);
CreateObject(11327,-9.40356,26.38010, 6.11379,0.00000,0.00000,90.06371);
CreateObject(17523,-13.41528,4.67514, 5.73827,0.00000,0.00000,0.00000);
CreateObject(16146,7.49780,18.20178, 6.50394,0.00000,0.00000,270.06854);
CreateObject(8131,19.38232,-17.49036, 13.85931,0.00000,0.00000,0.00000);
CreateObject(8132,12.97241,-22.70840, 5.89528,0.00000,0.00000,100.76155);
CreateObject(16360,33.93872,-8.65897, 3.52478,0.00000,0.00000,90.00000);
CreateObject(1487,40.83032,-1.71475, 3.60120,0.00000,0.00000,0.00000);
CreateObject(1487,41.31104,-1.49048, 3.60120,0.00000,0.00000,0.00000);
CreateObject(1487,41.11279,-1.38718, 3.60120,0.00000,0.00000,0.00000);
CreateObject(1487,40.83887,-1.48669, 3.60120,0.00000,0.00000,0.00000);
CreateObject(1486,41.10059,-1.71057, 3.50128,0.00000,0.00000,0.00000);
CreateObject(1486,41.20483,-1.61734, 3.50128,0.00000,0.00000,0.00000);
CreateObject(2690,-26.35107,-14.37772, 5.41401,0.00000,0.00000,0.00000);
CreateObject(2690,-26.95410,-14.99847, 5.41401,0.00000,0.00000,0.00000);
CreateObject(1691,-15.44653,4.20587, 7.45306,0.00000,0.00000,0.00000);
CreateObject(1691,-12.79004,21.40845, 9.04884,0.00000,0.00000,46.01675);
CreateObject(18261,16.63208,2.65176, 4.09948,0.00000,0.00000,269.00000);
CreateObject(1372,-1.70557,19.09384, 3.39655,0.00000,0.00000,0.00000);
CreateObject(1372,-0.05933,19.11768, 3.39655,0.00000,0.00000,0.00000);
CreateObject(1372,1.63452,19.09943, 3.39655,0.00000,0.00000,0.00000);
CreateObject(1264,-2.67407,18.62466, 3.90919,0.00000,0.00000,0.00000);
CreateObject(1264,-1.79736,18.27887, 3.80919,0.00000,0.00000,0.00000);
CreateObject(1264,-2.42529,17.76642, 3.80919,0.00000,0.00000,0.00000);
CreateObject(922,34.13599,-4.64258, 4.33294,0.00000,0.00000,0.00000);
return 1;
}
public OnPlayerSpawn(playerid)
{
RemoveBuildingForPlayer(playerid,10547,-2706.2969,375.5547,3.3828,0.25);
RemoveBuildingForPlayer(playerid,705,-2684.7188,399.3203,3.7734,0.25);
RemoveBuildingForPlayer(playerid,705,-2727.8672,398.9219,3.7734,0.25);
RemoveBuildingForPlayer(playerid,705,-2729.9844,353.9453,3.7734,0.25);
RemoveBuildingForPlayer(playerid,705,-2684.1484,352.6797,3.7734,0.25);
RemoveBuildingForPlayer(playerid,10378,-2706.2969,375.5547,3.3828,0.25);
RemoveBuildingForPlayer(playerid,1231,-2738.7734,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1231,-2730.6484,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1231,-2722.5234,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1231,-2690.0313,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1231,-2681.9063,376.0938,5.9375,0.25);
RemoveBuildingForPlayer(playerid,1340,-2691.6797,384.4922,4.4844,0.25);
RemoveBuildingForPlayer(playerid,1231,-2673.7813,376.0938,5.9375,0.25);
return 1;
}
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2065) : error 029: invalid expression, assumed zero
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2065) : error 017: undefined symbol "OnGamemodeInit"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2103) : warning 225: unreachable code
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2103) : error 029: invalid expression, assumed zero
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2103) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2105) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2106) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2107) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2108) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2109) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2110) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2111) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2112) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2113) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2114) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2115) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2116) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2117) : error 017: undefined symbol "playerid"
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2136) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2066) : error 055: start of function body without function header
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2101) : error 010: invalid function or declaration
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2117) : error 010: invalid function or declaration
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2135) : error 010: invalid function or declaration
C:\Users\Javier\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2141) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
#include <a_samp> #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" MAP 50%"); print("--------------------------------------\n"); return 1; } public OnGameModeInit() { CreateObject(10722,26.26270,13.52783, -13.75931,-90.00000,2.00000,0.81208); CreateObject(10722,25.72852,-13.03430, -13.75931,-90.00000,2.00000,0.81208); CreateObject(10722,25.52905,-22.48242, -13.75931,-90.00000,2.00000,0.81208); CreateObject(10722,-7.95605,-21.79263, -13.85931,-90.00000,2.00000,0.81208); CreateObject(10722,-7.89429,-12.41208, -13.75931,-90.00000,2.00000,0.81208); CreateObject(10722,-8.63525,14.29300, -13.75931,-90.00000,2.00000,0.81208); CreateObject(10847,34.59497,-26.38010, 9.62946,0.00000,0.00000,359.91620); CreateObject(11244,32.55859,12.82867, 6.52093,0.00000,0.00000,0.00000); CreateObject(11008,-9.78491,-25.67050, 10.01577,0.00000,0.00000,89.79150); CreateObject(11326,-24.19165,18.04590, 5.80078,0.00000,0.00000,0.00000); CreateObject(11327,-9.40356,26.38010, 6.11379,0.00000,0.00000,90.06371); CreateObject(17523,-13.41528,4.67514, 5.73827,0.00000,0.00000,0.00000); CreateObject(16146,7.49780,18.20178, 6.50394,0.00000,0.00000,270.06854); CreateObject(8131,19.38232,-17.49036, 13.85931,0.00000,0.00000,0.00000); CreateObject(8132,12.97241,-22.70840, 5.89528,0.00000,0.00000,100.76155); CreateObject(16360,33.93872,-8.65897, 3.52478,0.00000,0.00000,90.00000); CreateObject(1487,40.83032,-1.71475, 3.60120,0.00000,0.00000,0.00000); CreateObject(1487,41.31104,-1.49048, 3.60120,0.00000,0.00000,0.00000); CreateObject(1487,41.11279,-1.38718, 3.60120,0.00000,0.00000,0.00000); CreateObject(1487,40.83887,-1.48669, 3.60120,0.00000,0.00000,0.00000); CreateObject(1486,41.10059,-1.71057, 3.50128,0.00000,0.00000,0.00000); CreateObject(1486,41.20483,-1.61734, 3.50128,0.00000,0.00000,0.00000); CreateObject(2690,-26.35107,-14.37772, 5.41401,0.00000,0.00000,0.00000); CreateObject(2690,-26.95410,-14.99847, 5.41401,0.00000,0.00000,0.00000); CreateObject(1691,-15.44653,4.20587, 7.45306,0.00000,0.00000,0.00000); CreateObject(1691,-12.79004,21.40845, 9.04884,0.00000,0.00000,46.01675); CreateObject(18261,16.63208,2.65176, 4.09948,0.00000,0.00000,269.00000); CreateObject(1372,-1.70557,19.09384, 3.39655,0.00000,0.00000,0.00000); CreateObject(1372,-0.05933,19.11768, 3.39655,0.00000,0.00000,0.00000); CreateObject(1372,1.63452,19.09943, 3.39655,0.00000,0.00000,0.00000); CreateObject(1264,-2.67407,18.62466, 3.90919,0.00000,0.00000,0.00000); CreateObject(1264,-1.79736,18.27887, 3.80919,0.00000,0.00000,0.00000); CreateObject(1264,-2.42529,17.76642, 3.80919,0.00000,0.00000,0.00000); CreateObject(922,34.13599,-4.64258, 4.33294,0.00000,0.00000,0.00000); return 1; } public OnFilterScriptExit() { print("\n--------------------------------------"); print(" MAP 100% "); print("--------------------------------------\n"); return 1; } #endif //remove object only one time when he connect rather than using it onplayerspawn public OnPlayerConnect(playerid) { RemoveBuildingForPlayer(playerid,10547,-2706.2969,375.5547,3.3828,0.25); RemoveBuildingForPlayer(playerid,705,-2684.7188,399.3203,3.7734,0.25); RemoveBuildingForPlayer(playerid,705,-2727.8672,398.9219,3.7734,0.25); RemoveBuildingForPlayer(playerid,705,-2729.9844,353.9453,3.7734,0.25); RemoveBuildingForPlayer(playerid,705,-2684.1484,352.6797,3.7734,0.25); RemoveBuildingForPlayer(playerid,10378,-2706.2969,375.5547,3.3828,0.25); RemoveBuildingForPlayer(playerid,1231,-2738.7734,376.0938,5.9375,0.25); RemoveBuildingForPlayer(playerid,1231,-2730.6484,376.0938,5.9375,0.25); RemoveBuildingForPlayer(playerid,1231,-2722.5234,376.0938,5.9375,0.25); RemoveBuildingForPlayer(playerid,1231,-2690.0313,376.0938,5.9375,0.25); RemoveBuildingForPlayer(playerid,1231,-2681.9063,376.0938,5.9375,0.25); RemoveBuildingForPlayer(playerid,1340,-2691.6797,384.4922,4.4844,0.25); RemoveBuildingForPlayer(playerid,1231,-2673.7813,376.0938,5.9375,0.25); return 1; }