Range of point help -
dundolina - 13.05.2015
Hello i need rangeofpoint of this command with text. Here is my command:
Код:
if(strcmp(cmd, "/derby", true) == 0)
{
if(derbyplaying == 1)
{
SendClientMessage(playerid, 0xB4B5B7AA, "Дербито вече е започнало!");
return 1;
}
if(playerinminigame[playerid] == 1)
{
SendClientMessage(playerid, 0xB4B5B7AA, "Ти вече си в мини-игра!");
return 1;
}
new pname[256];
GetPlayerName(playerid, pname, 256);
if(derbyon == 0)
{
derbyon = 1;
playerinminigame[playerid] = 1;
playerinderby[playerid] = 1;
derbyrank = 1;
SetPlayerInterior(playerid,15);
SetPlayerVirtualWorld(playerid,7);
SetVehicleVirtualWorld(bloodring[0],7);
bloodringfull[0] = 1;
PutPlayerInVehicle(playerid, bloodring[0], 0);
playerinbloodring[playerid] = 0;
TogglePlayerControllable(playerid, 0);
startvar[0] = 1;
dtimer = SetTimer("StartDerby", 60000, 0);
format(string, sizeof(string), "%s стартира дерби, имаш една минута да напишеш /derby за да се присъединиш!", pname);//
SendClientMessageToAll(0x33AA33AA,string);
return 1;
} else if(derbyon == 1 && derbyrank < 15) {
playerinminigame[playerid] = 1;
playerinderby[playerid] = 1;
derbyrank++;
SetPlayerInterior(playerid,15);
for(new i=0; i<15; i++)
{
if(bloodringfull[i] == 0)
{
SetPlayerVirtualWorld(playerid,7);
SetVehicleVirtualWorld(bloodring[i],7);
bloodringfull[i] = 1;
PutPlayerInVehicle(playerid, bloodring[i], 0);
TogglePlayerControllable(playerid, 0);
playerinbloodring[playerid] = i;
format(string, sizeof(string), "%s се включи в дербито", pname);//
SendClientMessageToAll(0x33AA33AA,string);
return 1;
}
}
} else if(derbyon == 1 && derbyrank >= 15) {
format(string, sizeof(string), "Дербито е пълно, изчакайте следващият рунд", pname);//
SendClientMessage(playerid,0x33AA33AA,string);
return 1;
}
}
Re: Range of point help -
StR_MaRy - 13.05.2015
if(strcmp(cmd, "/derby", true) == 0)
{
if(derbyplaying == 1)
{
SendClientMessage(playerid, 0xB4B5B7AA, "Дa?бeoо вaчa a зaiочнaло!");
return 1;
}
if(playerinminigame[playerid] == 1)
{
SendClientMessage(playerid, 0xB4B5B7AA, "Oe вaчa ne в ieнe-ea?a!");
return 1;
}
if(PlayerToPoint(25.0, playerid, 429.1433,-675.1158,24.5984))
{
new pname[256];
GetPlayerName(playerid, pname, 256);
if(derbyon == 0)
{
derbyon = 1;
playerinminigame[playerid] = 1;
playerinderby[playerid] = 1;
derbyrank = 1;
SetPlayerInterior(playerid,15);
SetPlayerVirtualWorld(playerid,7);
SetVehicleVirtualWorld(bloodring[0],7);
bloodringfull[0] = 1;
PutPlayerInVehicle(playerid, bloodring[0], 0);
playerinbloodring[playerid] = 0;
TogglePlayerControllable(playerid, 0);
startvar[0] = 1;
dtimer = SetTimer("StartDerby", 60000, 0);
format(string, sizeof(string), "%s noa?oe?a дa?бe, eiao aднa ieнуoa дa нaieoao /derby зa дa na i?enъaдeнeo!", pname);//
SendClientMessageToAll(0x33AA33AA,string);
return 1;
} else if(derbyon == 1 && derbyrank < 15) {
playerinminigame[playerid] = 1;
playerinderby[playerid] = 1;
derbyrank++;
SetPlayerInterior(playerid,15);
for(new i=0; i<15; i++)
{
if(bloodringfull[i] == 0)
{
SetPlayerVirtualWorld(playerid,7);
SetVehicleVirtualWorld(bloodring[i],7);
bloodringfull[i] = 1;
PutPlayerInVehicle(playerid, bloodring[i], 0);
TogglePlayerControllable(playerid, 0);
playerinbloodring[playerid] = i;
format(string, sizeof(string), "%s na вeл?чe в дa?бeoо", pname);//
SendClientMessageToAll(0x33AA33AA,string);
return 1;
}
}
} else if(derbyon == 1 && derbyrank >= 15) {
format(string, sizeof(string), "Дa?бeoо a iълно, eзчaeaйoa nлaдвaueyo ?унд", pname);//
SendClientMessage(playerid,0x33AA33AA,string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "[Derby]: You are not in right Area to use: /derby");
}
}
Re: Range of point help -
dundolina - 13.05.2015
Works but also give me a Unknown command with the message..
Re: Range of point help -
StR_MaRy - 13.05.2015
else
{
SendClientMessage(playerid, COLOR_GRAD1, "[Derby]: You are not in right Area to use: /derby");
}
return 1;
}
try this return 1;