Код:
// This script is created/scripted By Elmin (http://forum.sa-mp.com/member.php?u=61459)
// Streamer plugin by Incognito
#include <a_samp>
#include <streamer>
#define COLOR_YELLOW 0xFFFF00AA
enum MainName {
Zone_Name[64],
Float:Area[3]
};
new cpid, timerid;
new Float:cps[][MainName] = {
{"Easter Basin", {-1738.8892,147.4447,3.5547}},
{"SF Downtown Helipad", {-1684.0514,704.8934,30.6016}},
{"SF Downtown Car Shop Roof", {-1673.4921,1209.9197,32.9307}},
{"LS Airport Race Track", {1477.1588,1276.0544,10.8203}},
{"SF Easter Tunnel", {-1680.3920,-766.6390,41.3015}},
{"LV Blackfield Intersection", {1188.8329,896.0413,11.5919}},
{"LV Hunter Quary", {747.5848,766.2541,-3.5519}},
{"AA Docks", {259.6457,2902.9409,7.4582}},
{"AA El Castilo del Diablo Giant Penis", {-425.5155,2507.3477,124.3047}},
{"LV Pirate Ship", {2022.6226,1546.2026,10.8226}},
{"LV Airport Parking Lot", {1686.0709,1295.7816,10.8203}},
{"LV Julius Thruway North", {1849.0345,2569.6482,10.8203}},
{"East LS Basketball Court", {2317.6072,-1527.2966,25.3438}},
{"LS Downtown", {1592.5835,-1297.0625,17.3033}},
{"LS Temple", {1335.8844,-956.3817,36.6641}},
{"Dilimore PD", {630.3858,-599.3079,16.3359}},
{"Red County Underbridge", {480.3277,-260.1087,10.8516}},
{"Lv Red Sands West Ramp", {1482.3340,2033.6136,12.4093}},
{"SF Jizzy's Rooftop", {-2637.1245,1410.8300,23.8984}},
{"Sherman Reservoir Stunt Area", {-789.9260,1723.5712,32.1113}},
{"Mount Chilliad", {-2055.8794,-1336.2556,30.7644}},
{"Missionary Hill Stunt Area", {-3019.5574,-771.7321,12.2132}},
{"LS International", {1655.4785,-2371.3706,18.1477}},
{"Ocean Docks Crane", {2398.3965,-2258.4854,13.3828}},
{"Yellow_Bell_Golf_Co", {1207.02, 2810.09, 10.82}},
{"Pillson_Intersection", {1286.58, 2448.64, 8.53}}
};
public OnFilterScriptInit() {
print("Checkpoint Hunt By Elmin..");
timerid = SetTimer("cpss", 3 * 60 * 1000, true);
cpss();
return 1;
}
public OnFilterScriptExit() {
KillTimer(timerid);
remcpss();
return 1;
}
forward cpss();
public cpss() {
new string[128];
new rand = random(sizeof(cps)); {
remcpss();
cpid = CreateDynamicCP(cps[rand][Area][0], cps[rand][Area][1], cps[rand][Area][2], 30.0);
format(string, sizeof(string), "{0049FF}[Hint] New Checkpoint is created near {C9FFAB}(( %s )) {0049FF}collect it and get a prize!", cps[rand][Zone_Name][0]);
SendClientMessageToAll(0xFFFF00AA, string);
}
return 1;
}
remcpss() {
if (cpid)
DestroyDynamicCP(cpid);
}
public OnPlayerEnterCheckpoint(playerid){
if(IsPlayerInDynamicCP(playerid,cpid)) {
GivePlayerMoney(playerid,15000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 15);
new PlayerName[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "%s has collected a hidden checkpoint and earned {C9FFAB}+15 score and $15000!", PlayerName);
SendClientMessageToAll(0xFFFF00AA, string);
remcpss();
return 1;
}
return 1;
}
when i compile no errors and succsfully complied but when the checkpoint is created and anyone collect it the score doesnt be added or money