

//Variables
new Float:checkCoords[MAX_POINTS][4] = {
{765.2560,-75.7783,1000.6563,116.2320} // GYM
};
new Float:checkpoints[MAX_POINTS][4] = {
{758.7912,-76.8209,1000.6505,2.0} // GYM
};
CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
TestCP = CreateDynamicCP(0.0, 0.0, 10.0, 3.0);
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == TestCP)
{
//Code
SendClientMessage(playerid, COLOR_WHITE, "You have entered TestCP.");
}
}
public OnPlayerExitDynamicCP(playerid, checkpointid)
{
if(checkpointid == TestCP)
{
//Code
SendClientMessage(playerid, COLOR_WHITE, "You have exited TestCP.");
}
}
|
PHP код:
|
//Variables
new Float:checkCoords[MAX_POINTS][4] = {
{364.8546,-73.9157,1001.5078,95.3553}, //CityHallMain
{773.6013,-74.7775,1000.6545,8.0615}, // GYM
{-103.9279,-21.0403,1000.7188,185.1817} // SEXSHOP
};
new Float:checkpoints[MAX_POINTS][4] = {
{378.9092,-64.9800,1001.5078,2.0}, //CityHallMain
{762.3055,-59.8439,1000.6563,2.0}, // GYM
{-104.8868,-8.3020,1000.7188,2.0} // SEXSHOP
};
new checkpointType[MAX_POINTS] = {
CP_CityHallMain,
CP_GYM,
CP_SEX
};
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_YES) //KEY_YES - Y tuşu
{
new string[128];
if(Spawnoldumu[playerid] != 1)
{
SendClientMessage(playerid,COLOR_ERROR,"Şu Anda Komut Kullanamazsın");
return 1;
}
if(IsKidnapped[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"Şu Anda Komut Kullanamazsın");
return 1;
}
if(Donduruldumu[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"Şu Anda Komut Kullanamazsın");
return 1;
}
if(!IsPlayerInCheckpoint(playerid))
{
SendClientMessage(playerid,COLOR_ERROR,"Soyabileceğin Bir Yerde Değilsin");
return 1;
}
if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_CIA || gTeam[playerid] == TEAM_MEDIC)
{
SendClientMessage(playerid,COLOR_ERROR,"Hırsız Değilsin!!!");
return 1;
}
if(getCheckpointType(playerid) != CP_GYM && getCheckpointType(playerid) != CP_CityHallMain &&
getCheckpointType(playerid) != CP_SEX)
{
SendClientMessage(playerid,COLOR_ERROR,"Checpointte Değilsin.");
return 1;
}
if(getCheckpointType(playerid) == CP_CityHallMain)
{
new rrand =random(100);
if(CityHallRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The City Hall Kısa Sьre Цnce Soyuldu");
return 1;
}
if(RobSkill[playerid] >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"Soygun Yeteneğiniz Yetersiz (/syetenek)");
return 1;
}
if(rrand <= 30)
{
SendClientMessage(playerid,COLOR_ERROR,"City Hall Soygunu {FF0000}Başarısız.");
CityHallRobbedRecently =320;
return 1;
}
CityHallRobbedRecently =320;
RobbingCityHall[playerid] =25;
IncreaseWantedLevel(playerid,4);
if(group[playerid][gid] != -1){
for(new i; i < MAX_PLAYERS; i++){
if(group[i][gid] == group[playerid][gid]){
if(gTeam[i] == TEAM_CIVIL)
{
if(i != playerid){
IncreasePlayerScore(i, 1);
}
}}}
}
format(string,sizeof(string),"Soyulan Yer: City Hall.\nSoygunun Bitmesine: %d Saniye.\nPolisler Yolda",RobbingCityHall[playerid]);
soygunsuresi[playerid] = 25;//ShowPlayerDialog(playerid,DIALOG_CITYHALL,DIALOG_STYLE_MSGBOX,"{FF0000}City Hall Soyuluyor",string,"Tamam","Iptal");
format(string,sizeof(string),"[Polis Telsizi] Sьpheli %s(%d) Şu Mekanı Soyuyor City Hall! the City Hall Mekanına Git Ve Suзluyu Yakala",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"~g~[SOYGUN]~r~ %s(%d)~w~ adli kisi su mekani soyuyor:~y~ the City Hall ..",PlayerName(playerid),playerid);
Textdrawyazi(playerid, string);
//SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[] %s(%d) has begun a at the City Hall ..",PlayerName(playerid),playerid);
return 1;
}
if(getCheckpointType(playerid) == CP_SEX)
{
new rrand =random(100);
if(SexRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"Sex Shop Kısa Sьre Цnce Soyuldu");
return 1;
}
if(RobSkill[playerid] >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"Soygun Yeteneğiniz Yetersiz (/syetenek)");
return 1;
}
if(rrand <= 30)
{
SendClientMessage(playerid,COLOR_ERROR,"Sex Shop Soygunu {FF0000}Başarısız.");
CityHallRobbedRecently =320;
return 1;
}
SexRobbedRecently =320;
RobbingSEX[playerid] =25;
IncreaseWantedLevel(playerid,4);
if(group[playerid][gid] != -1){
for(new i; i < MAX_PLAYERS; i++){
if(group[i][gid] == group[playerid][gid]){
if(gTeam[i] == TEAM_CIVIL)
{
if(i != playerid){
IncreasePlayerScore(i, 1);
} }}
}
}
format(string,sizeof(string),"Soyulan Yer: Sex Shop.\nSoygunun Bitmesine: %d Saniye.\nPolisler Yolda",RobbingCityHall[playerid]);
soygunsuresi[playerid] = 25;//ShowPlayerDialog(playerid,DIALOG_CITYHALL,DIALOG_STYLE_MSGBOX,"{FF0000}City Hall Soyuluyor",string,"Tamam","Iptal");
format(string,sizeof(string),"[Polis Telsizi] Sьpheli %s(%d) Şu Mekanı Soyuyor Sex Shop! Sex Shop Mekanına Git Ve Suзluyu Yakala",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"~g~[SOYGUN]~r~ %s(%d)~w~ adli kisi su mekani soyuyor:~y~ Sex Shop ..",PlayerName(playerid),playerid);
Textdrawyazi(playerid, string);
//SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[] %s(%d) has begun a at the Sex Shop ..",PlayerName(playerid),playerid);
return 1;
}
if(getCheckpointType(playerid) == CP_GYM)
{
new rrand =random(100);
if(GYMRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The GYM Kısa Sьre Цnce Soyuldu");
return 1;
}
if(RobSkill[playerid] >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"Soygun Yeteneğiniz Yetersiz (/syetenek)");
return 1;
}
if(rrand <= 30)
{
SendClientMessage(playerid,COLOR_ERROR,"GYM Soygunu {FF0000}Başarısız.");
GYMRobbedRecently =320;
return 1;
}
GYMRobbedRecently =320;
RobbingGYM[playerid] =25;
IncreaseWantedLevel(playerid,4);
if(group[playerid][gid] != -1){
for(new i; i < MAX_PLAYERS; i++){
if(group[i][gid] == group[playerid][gid]){
if(gTeam[i] == TEAM_CIVIL)
{
if(i != playerid){
IncreasePlayerScore(i, 1);
} }}
}
}
format(string,sizeof(string),"Soyulan Yer: GYM.\nSoygunun Bitmesine: %d Saniye.\nPolisler Yolda",RobbingGYM[playerid]);
soygunsuresi[playerid] = 25;//ShowPlayerDialog(playerid,DIALOG_GYM,DIALOG_STYLE_MSGBOX,"{FF0000}GYM Soyuluyor",string,"Tamam","Iptal");
format(string,sizeof(string),"[Polis Telsizi] Sьpheli %s(%d) Şu Mekanı Soyuyor GYM! the GYM Mekanına Git Ve Suзluyu Yakala",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"~g~[SOYGUN]~r~ %s(%d)~w~ adli kisi su mekani soyuyor:~y~ the GYM ..",PlayerName(playerid),playerid);
Textdrawyazi(playerid, string);
//SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[] %s(%d) has begun a at the GYM ..",PlayerName(playerid),playerid);
return 1;
}
return 1;
}
return 1;
}