rendered paste bodypublic OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new cmd[256];
new idx;
new reason[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd,"/about",true)==0) {
SendClientMessage(playerid,0xFFFFFFAA,"Sunday Drivers GM 0.1b");
SendClientMessage(playerid,0xFFFFFFAA,"This gamemode was created by Chiarboss");
SendClientMessage(playerid,0xFFFFFFAA,"Do NOT copy this gamemode code or part of it.");
return 1;
}
if(strcmp(cmd,"/cmdlist",true)==0) {
SendClientMessage(playerid,0xFFFF00AA,"/cmdlist /admcmdlist /about /hud /shop /race /clock /bet");
SendClientMessage(playerid,0xFFFF00AA,"/startvote /shophelp /speedo /sound /kill /exit /givecash");
SendClientMessage(playerid,0xFFFF00AA,"(/ad)vertisement /ooc (/r)acetalk /countdown /dist /heal");
return 1;
}
if(strcmp(cmd,"/admcmdlist",true)==0) {
SendClientMessage(playerid,0xFFFF00AA,"/shoplock /restart /racetime /racetype /racechat /votesystem");
SendClientMessage(playerid,0xFFFF00AA,"/info /hudlock /vehicles /bounds /out /savemoney /savescore ");
SendClientMessage(playerid,0xFFFF00AA,"/cnn /cnnn /noooc /freezeall /unfreezeall /freeze /unfreeze");
SendClientMessage(playerid,0xFFF00AA,"/mute /unmuteall /line /countdown /cdforall /distlock /god");
SendClientMessage(playerid,0xFFFF00AA,"/timeset /healLock ;");
return 1;
}
if(strcmp(cmd,"/shophelp",true)==0) {
SendClientMessage(playerid,0xFFFF00AA,"If you are spawned and if you are in the Stadium Interior of BloodRing DD,");
SendClientMessage(playerid,0xFFFF00AA,"press /shop for enter in your Personal Shop");
SendClientMessage(playerid,0xFFFF00AA,"Type /mac10 for buy a Mac10 for 1000$;");
SendClientMessage(playerid,0xFFFF00AA,"type /tec9 for buy a Tec9 Mitra for 1200$;");
SendClientMessage(playerid,0xFFFF00AA,"type /MP5 for buy a MP5 for 200$");
SendClientMessage(playerid,0xFFFF00AA,"P.S.:Every time that you choose an option,");
SendClientMessage(playerid,0xFFFF00AA,"you will newly press /shop.");
return 1;
}
/*if(strcmp(cmd,"/bet",true)==0) {
if(betting == 1) {
new tmp[256],name[MAX_PLAYER_NAME],playername[MAX_PLAYER_NAME];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_RED,"Usage: /bet [playerid]");
return 1;
}
pidbet[playerid] = strval(tmp);
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
if(betted[playerid] == 1) {
SendClientMessage(playerid,0xFF8A00AA,"You have successfully unbetted the player choiced.");
betted[playerid] = 0;
}else{
SendClientMessage(playerid,COLOR_RED,"Usage: /bet [playerid] [delay]");
}
return 1;
}
bounty[playerid] = strval(tmp);
if(betted[playerid] == 1) {
SendClientMessage(playerid,COLOR_RED,"You have already betted. Press /bet [playerid] for unbet.");
return 1;
}
if(bounty[playerid] <= GetPlayerMoney(playerid)) {
if(pidbet[playerid] != INVALID_PLAYER_ID) {
GetPlayerName(playerid,name,sizeof(name)); GetPlayerName(pidbet[playerid],playername,sizeof(playername));
format(string,sizeof(string),"%s has betted on %s for the first place!",name,playername);
SendClientMessageToAll(0xFF8A00AA,string);
betted[playerid] = 1;
}else{SendClientMessage(playerid,COLOR_RED,"This is an invalid playerID. Press TAB for see the all valids playerID");}
}else{SendClientMessage(playerid,COLOR_RED, "You dont have enough money! Win more races and come back!");}
}else{SendClientMessage(playerid,COLOR_RED,"Betting system is currently disabled.");}
return 1;
}
if(strcmp(cmd,"bets",true)==0) {
if(betting == 1) {
new x,name[MAX_PLAYER_NAME];
SendClientMessage(playerid, COLOR_YELLOW, "Current Bets:");
for(new i=0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && bounty[i] > 0) {
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), "%s%s(%d): $%d", string,pidbet[i],i,bounty[i]);
x++;
if(x > 3) {
SendClientMessage(playerid, 0xFF8A00AA, string);
x = 0;
format(string, sizeof(string), "");
} else {
format(string, sizeof(string), "%s, ", string);
}
}
}
if(x <= 3 && x > 0) {
string[strlen(string)-2] = '.';
SendClientMessage(playerid,0xFF8A00AA, string);
}
}else{SendClientMessage(playerid,COLOR_RED,"Betting system is currently disabled.");}
return 1;
}
if(strcmp(cmd,"/betlock",true)==0) {
if(IsPlayerAdmin(playerid)) {
if(BETTING == 1) {
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
if(betting == 1) {
betting=0; format(string,sizeof(string),"The Admin %s has disabled the Betting system.",name);
for(new i=0;i<MAX_PLAYERS;i++)betted[i]=0;
}else{betting=1; format(string,sizeof(string),"The Admin %s has enabled the Betting system.",name);
for(new i=0;i<MAX_PLAYERS;i++)betted[i]=0;}
}else{SendClientMessage(playerid, COLOR_RED,"Betting system is currently disabled via INI");}
}else{SendClientMessage(playerid, COLOR_RED, "You arent admin!!!");}
return 1;
}*/
if(strcmp(cmd,"/racetalk",true) == 0 || strcmp(cmd,"/r",true)==0) {
if(systemrc == 1) {
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_RED, "Usage: (/r)acetalk [text]");
return 1;
}
format(string,sizeof(string),"%s",result);
SendClientMessageToAll(COLOR_LIGHTBLUE,string);
} else {
SendClientMessage(playerid,COLOR_RED,"The RaceChat system is currently disabled.");
}
return 1;
}
if(strcmp(cmd, "/cnn", true) == 0)
{
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
if (IsPlayerAdmin(playerid))
{
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_RED, "Usage: /cnn [cnn textformat ~n~=Newline ~r~=Red ~g~=Green ~b~=Blue ~w~=White ~y~=Yellow]");
return 1;
}
format(string, sizeof(string), "~b~%s: ~w~%s",name,result);
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
{
GameTextForPlayer(i, string, 5000, 6);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/countdown",true)==0) {
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
if(forall == 0) {
if(IsPlayerAdmin(playerid)) {
KillTimer(cdtimer);
cdtimer = SetTimer("MCountdown",1000,1);
format(string,sizeof(string),"The Admin %s has initialized a new countdown",name);
}else{SendClientMessage(playerid, COLOR_RED, "You arent admin!!!");return 1;}
}else{
KillTimer(cdtimer);
cdtimer = SetTimer("MCountdown",1000,1);
format(string,sizeof(string),"- %s has initialized a new countdown",name);
}
SendClientMessageToAll(0xFF8A00AA,string);
countdown = 4;
return 1;
}
if(strcmp(cmd,"/timeset",true)==0) {
if(IsPlayerAdmin(playerid)) {
if(restart == 2) {
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
if(timerex == 1){
timerex=0;
KillTimer(gRoundTimer);
format(string,sizeof(string),"The Admin %s has enabled the RealTime function.",name);
CLOCK_Timer = SetTimer("CLOCK_EverySecondTimer",999,1);
CLOCK_hour = YOUR_START_HOUR;
CLOCK_minute = YOUR_START_MINUTE;
clockex=0; for(new i=0; i<MAX_PLAYERS;i++)TogglePlayerClock(i,0);
}else{timerex=1; KillTimer(CLOCK_Timer); clockex=1; for(new i=0; i<MAX_PLAYERS;i++)TogglePlayerClock(i,1); format(string,sizeof(string),"The Admin %s has disabled the RealTime function.",name); gRoundTimer=SetTimer("Timer_DayHeartbeat", 60000, 1);}
SendClientMessageToAll(0xFF8A00AA,string);
}
}else{SendClientMessage(playerid, COLOR_RED, "You arent admin!!!");}
return 1;
}
if(strcmp(cmd, "/cnnn", true) == 0)
{
new tmp[256];
if (IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
new txtid;
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "Usage: /cnnn <type> ");
return 1;
}
txtid = strval(tmp);
if(txtid == 2)
{
SendClientMessage(playerid, COLOR_RED, "You cannot select 2 txtid");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_RED, "Usage: /cnnn <type> [cnnc textformat ~n~=Newline ~r~=Red ~g~=Green ~b~=Blue ~w~=White ~y~=Yellow]");
return 1;
}
format(string, sizeof(string), "~w~%s",result);
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
{
GameTextForPlayer(i, string, 5000, txtid);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You arent admin!!!");
}
return 1;}
if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
{
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_RED, "Usage: (/ad)vertise [advert text]");
return 1;
}
format(string, sizeof(string), "Advertisement: %s, Contact: %s", result, name);
SendClientMessageToAll(TEAM_GROVE_COLOR,string);
printf("%s", string);
return 1;
}
if(strcmp(cmd,"/gethere",true) == 0) {
if(IsPlayerAdmin(playerid) == 1) {
if(SYSTEMADMIN == 1) {
new playername[MAX_PLAYER_NAME];
new name[MAX_PLAYER_NAME];
new tmp[256];
new pid;
new Float:plx;
new Float:ply;
new Float:plz;
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF8A00AA,"Usage: /gethere [playerid]");
return 1;
}
pid = strval(tmp);
if(pid != INVALID_PLAYER_ID) {
GetPlayerName(pid,playername,sizeof(playername));
GetPlayerName(playerid,name, sizeof(name));
GetPlayerPos(playerid, plx, ply, plz);
if (IsPlayerInAnyVehicle(pid) == 0) {
SetPlayerPos(pid, plx, ply, plz);
} else {
SetVehiclePos(GetPlayerVehicleID(pid),plx,ply,plz);
}
SetPlayerInterior(pid,0);
format(string,sizeof(string),"%s has teleported to him %s .",name,playername);
SendClientMessageToAll(0xFF8A00AA,string);
}else{SendClientMessage(playerid,COLOR_RED,"This is an invalid playerID. Press TAB for see the all valids playerID");}
}else{SendClientMessage(playerid,COLOR_RED,"Administration System is currently disabled via INI.");}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/freeze",true) == 0) {
if(IsPlayerAdmin(playerid)) {
if(SYSTEMADMIN == 1) {
new name[MAX_PLAYER_NAME],tmp[256],pid,playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
if(freezedall == 0){format(string,sizeof(string),"The Admin %s has freezed all players connected.",name);freezedall=1;for(new i=0;i<MAX_PLAYERS;i++)TogglePlayerControllable(i,0);}else{format(string,sizeof(string),"The Admin %s has unfreezed all players connected.",name);freezedall=0;for(new i=0;i<MAX_PLAYERS;i++)TogglePlayerControllable(i,1);}
SendClientMessageToAll(0xFF8A00AA,string);
return 1;
}
pid = strval(tmp);
GetPlayerName(pid,playername,sizeof(playername));
if(pid == playerid) {
SendClientMessage(playerid,COLOR_RED,"You cannot freeze yourself!");
return 1;
}
if(pid != INVALID_PLAYER_ID) {
if(freezed[pid] == 0){freezed[pid]=1;TogglePlayerControllable(pid,0);format(string,sizeof(string),"The Admin %s has freezed %s",name,playername);}else{
freezed[pid] = 0;TogglePlayerControllable(pid,1);format(string,sizeof(string),"The Admin %s has unfreezed %s",name,playername);
}
SendClientMessageToAll(0xFF8A00AA,string);
}else{SendClientMessage(playerid,COLOR_RED,"This is an invalid playerID. Press TAB for see the all valids playerID");}
}else{SendClientMessage(playerid,COLOR_RED,"Administration System is currently disabled via INI.");}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"mute",true)==0) {
if(IsPlayerAdmin(playerid)) {
if(SYSTEMADMIN == 1) {
new name[MAX_PLAYER_NAME],tmp[256],pid,playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
if(mutedall == 0){format(string,sizeof(string),"The Admin %s has muted all players connected.",name);mutedall=1;for(new i=0;i<MAX_PLAYERS;i++)mute[i]=1;}else{format(string,sizeof(string),"The Admin %s has unmuted all players connected.",name);mutedall=0;for(new i=0;i<MAX_PLAYERS;i++)mute[i]=0;}
SendClientMessageToAll(0xFF8A00AA,string);
return 1;
}
pid = strval(tmp);
if(pid == playerid) {
SendClientMessage(playerid,COLOR_RED,"You cannot mute yourself!");
return 1;
}
if(pid != INVALID_PLAYER_ID) {
if(mute[pid] == 0){mute[pid]=1;format(string,sizeof(string),"The Admin %s has muted %s",name,playername);}else{
mute[pid] = 0;format(string,sizeof(string),"The Admin %s has unmuted %s",name,playername);
}
SendClientMessageToAll(0xFF8A00AA,string);
}else{SendClientMessage(playerid,COLOR_RED,"This is an invalid playerID. Press TAB for see the all valids playerID");}
}else{SendClientMessage(playerid,COLOR_RED,"Administration System is currently disabled via INI.");}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/god",true) == 0) {
if(IsPlayerAdmin(playerid)) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name, sizeof(name));
SetPlayerHealth(playerid, 100000);
format(string,sizeof(string),"WARNING! The Admin %s has activated to himself the God-Mode!!",name);
SendClientMessageToAll(0xFF8A00AA,string);
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/heal",true)==0) {
if(sheal == 1) {
if(confirmcomp[playerid] == 1 || confirmcomp[playerid] == 3) {
new pid,tmp[256],name[MAX_PLAYER_NAME],playername[MAX_PLAYER_NAME];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_RED,"Usage: /heal [playerid]");
return 1;
}
pid = strval(tmp);
GetPlayerName(pid,playername,sizeof(playername)); GetPlayerName(playerid,name,sizeof(name));
if(confirmcomp[pid] == 1 || confirmcomp[pid] == 3) {
if(pid == playerid){SendClientMessage(playerid,COLOR_RED,"You cannot heal your vehicle.");return 1;}
SetVehicleHealth(GetPlayerVehicleID(pid),1000.0);
format(string,sizeof(string),"%s has been healed by %s",playername,name);
SendClientMessageToAll(0xFF8A00AA,string);
}else{SendClientMessage(playerid,COLOR_RED,"This player isnt in one of the Interior Stadium.");}
}else{SendClientMessage(playerid,COLOR_RED,"Heal System is currently disabled.");}
}else{SendClientMessage(playerid,COLOR_RED,"You must be in one of the Interior Stadium.");}
return 1;
}
if(strcmp(cmd,"/healLock",true)==0) {
if(IsPlayerAdmin(playerid)) {
if(SYSTEMHEAL == 1) {
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
if(sheal == 1) {sheal=0;format(string,sizeof(string),"The Admin %s has disabled the System Heal",name);
}else{ sheal=1;format(string,sizeof(string),"The Admin %s has enabled the System Heal",name);}
}else{SendClientMessage(playerid,COLOR_RED,"Heal system is currently disabled via INI");}
}else{SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");}
return 1;
}
if(strcmp(cmd,"/dist",true) == 0) {
if(dist == 1) {
new playername[MAX_PLAYER_NAME];
new name[MAX_PLAYER_NAME];
new tmp[256];
new pid;
new dis;
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessageToAll(0xFF8A00AA,"Utilizzo: /dist [playerid]");
return 1;
}
pid = strval(tmp);
if(pid != INVALID_PLAYER_ID) {
dis = GetDistanceBetweenPlayers(playerid,pid);
GetPlayerName(pid,playername,sizeof(playername));
GetPlayerName(playerid,name, sizeof(name));
format(string,sizeof(string),"%s is far %d meters from %s .",playername,dis,name);
SendClientMessageToAll(0xFF8A00AA,string);
}else{SendClientMessage(playerid,COLOR_RED,"This is an invalid playerID. Press TAB for see the all valids playerID");}
} else {
SendClientMessage(playerid,COLOR_RED,"Distance System is currently disabled.");
}
return 1;
}
if(strcmp(cmd,"/distlock",true)==0) {
if(IsPlayerAdmin(playerid)) {
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
if(SYSTEMDIST == 1) {
if(dist == 1) {
dist = 0;
format(string,sizeof(string),"The Admin %s has disabled the System Distance",name);
}else{
dist = 1;
format(string,sizeof(string),"The Admin %s has enabled the System Distance",name);
}
SendClientMessageToAll(0xFF8A00AA,string);
} else {
SendClientMessage(playerid,0xFF8A00AA,"Distance System is currently disabled via INI");
}
} else {
SendClientMessage(playerid, COLOR_RED, "You arent admin!!!");
}
return 1;
}
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
{
if (ooclock == 1)
{
SendClientMessage(playerid, COLOR_RED, "The OOC channel has been disabled.");
return 1;
}
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_RED, "Usage: (/o)oc [ooc chat]");
return 1;
}
format(string, sizeof(string), "(( %s: %s ))", name, result);
SendClientMessageToAll(COLOR_ORANGE,string);
printf("%s", string);
return 1;
}
if(strcmp(cmd, "/noooc", true) == 0)
{
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
if (IsPlayerAdmin(playerid))
{
if(ooclock == 0) {
ooclock = 1;
format(string,sizeof(string),"The Admin %s has disabled the OOC chat channel.",name);
}else{
ooclock = 0;
format(string,sizeof(string),"The Admin %s has enabled the OOC chat channel.",name);
}
SendClientMessageToAll(0xFF8A00AA,string);
} else {
SendClientMessage(playerid, COLOR_RED, "You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/speedo",true)==0) {
if(inspeedo == 1) {
if(speedo[playerid] == 1) {
speedo[playerid] = 2;
SendClientMessage(playerid,0xFF8A00AA,"You have choiced the KM/H speedometer.");
}
else if(speedo[playerid] == 2) {
speedo[playerid] = 1;
SendClientMessage(playerid,0xFF8A00AA,"You have choiced the MpH (default) speedometer.");
}
} else {
SendClientMessage(playerid,COLOR_RED,"One admin has disabled this command.");
}
return 1;
}
if(strcmp(cmd,"/race",true)==0) {
if(players < MINPLAYERS && players > MAX_PLAYERS){
SendClientMessage(playerid,COLOR_RED,"Players parameters has been trespassed.");
format(string,sizeof(string),"Current Players connected: %d Maximum Players allowed: %d Minimum players for start the race: %d",players,MAXPLAYERS,MINPLAYERS);
SendClientMessage(playerid,0xFF8A00AA,string);}
else {
if(vehicles == 1) {
if(!IsPlayerInAnyVehicle(playerid)) {
GameTextForPlayer(playerid,"~r~Take ~w~a ~y~vehicle!",5000,3);
} else {
SetupForRace(playerid);
}
} else {
SetupForRace(playerid);
}
}
return 1;
}
if(strcmp(cmd, "/givecash", true) == 0) {
new tmp[256];
new giveplayerid;
new moneys;
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_RED, "Usage: /givecash [playerid] [amount]");
return 1;
}
giveplayerid = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_RED, "Usage: /givecash [playerid] [amount]");
return 1;
}
moneys = strval(tmp);
printf("givecash_command: %d %d",giveplayerid,moneys);
if (IsPlayerConnected(giveplayerid)) {
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
playermoney = GetPlayerMoney(playerid);
if (moneys > 0 && playermoney >= moneys) {
GivePlayerMoney(playerid, (0 - moneys));
GivePlayerMoney(giveplayerid, moneys);
format(string, sizeof(string), "You have sent %s(player: %d), $%d.", giveplayer,giveplayerid, moneys);
SendClientMessage(playerid, 0xFF8A00AA, string);
format(string, sizeof(string), "You have recieved $%d from %s(player: %d).", moneys, sendername, playerid);
SendClientMessage(giveplayerid, 0xFF8A00AA, string);
printf("%s(playerid:%d) has transfered %d to %s(playerid:%d)",sendername, playerid, moneys, giveplayer, giveplayerid);
}
else {
SendClientMessage(playerid, COLOR_RED, "Invalid transaction amount.");
}
}
else {
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
}
return 1;
}
if(strcmp(cmd, "/shop", true)==0)
{
if(confirmcomp[playerid] == 2) {
if(shop == 1) {
inarmory[playerid] = 1;
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname, sizeof(pname));
format(string, sizeof(string), "- Welcome to your Personal Armory, %s; -", pname);
SendClientMessage(playerid, 0xFF8A00AA, string);
SendClientMessage(playerid, 0xFF8A00AA, "Here you can buy:");
SendClientMessage(playerid, 0xFF8A00AA, "----------------------------------");
SendClientMessage(playerid, 0xFF8A00AA, "/mac10[1000$]");
SendClientMessage(playerid, 0xFF8A00AA, "/tec9 [1200$]");
SendClientMessage(playerid, 0xFF8A00AA, "/MP5 [2000$]");
SendClientMessage(playerid, 0xFF8A00AA, "----------------------------------");
} else {
SendClientMessage(playerid,0xFF8A00AA,"This command has been disabled.");
}
} else {
GameTextForPlayer(playerid,"~r~DD ~w~isnt currently ~r~initialized.",3000,3);
}
return 1;
}
if (strcmp(cmd, "/mac10", true)==0) {
if (inarmory[playerid] == 1) {
if(GetPlayerMoney(playerid) >= 1000){
SendClientMessage(playerid, 0xFF8A00AA, "- You have bought a Mac-10 for 1200$. -");
GivePlayerWeapon(playerid, 28, 999999);
GivePlayerMoney(playerid, -1000);
inarmory[playerid] = 0;
} else {
SendClientMessage(playerid, COLOR_RED, "You dont have enough money! Win more races and come back!");
}
return 1;
}
}
if(strcmp(cmd,"/tec9", true)==0) {
if (inarmory[playerid] == 1) {
if(GetPlayerMoney(playerid) >= 1200){
SendClientMessage(playerid, 0xFF8A00AA, "- You have bought a Tec9 Mitra for 1200$. -");
GivePlayerWeapon(playerid, 32, 999999);
GivePlayerMoney(playerid, -1200);
inarmory[playerid] = 0;
} else {
SendClientMessage(playerid, COLOR_RED, "You dont have enough money! Win more races and come back!");
}
return 1;
}
}
if(strcmp(cmd,"/MP5", true)==0) {
if (inarmory[playerid] == 1) {
if(GetPlayerMoney(playerid) >= 2000){
SendClientMessage(playerid, 0xFF8A00AA, "- You have bought a MP5 for 1200$. -");
GivePlayerWeapon(playerid, 29, 999999);
GivePlayerMoney(playerid, -2000);
inarmory[playerid] = 0;
} else {
SendClientMessage(playerid, COLOR_RED, "You dont have enough money! Win more races and come back!");
}
return 1;
}
}
if(strcmp(cmd,"/win",true)==0) {
if(confirmcomp[playerid] == 2) {
if(playersindd == 1) {
new sentence2[256];
new Float:fMinutes;
new Minutes;
new Seconds;
new name[MAX_PLAYER_NAME];
fMinutes = gTime/60;
Minutes = floatround(fMinutes, floatround_floor);
Seconds = gTime-(Minutes*60);
GetPlayerName(playerid, name, 256);
KillTimer(gTimer);
for(new i=0; i<MAX_PLAYERS;i++){if(betted[i]==1)if(pidbet[i] == playerid)GivePlayerMoney(i,bounty[i]);else GivePlayerMoney(i,-bounty[i]);betted[i]=0;}
if(restart != 2){SetWorldTime(20);}
playersindd=0;
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"~r~%s ~w~win the ~y~DD!!!",name);
GameTextForAll(string,5000,6);
format(sentence2,256,"DDNEWS: %s win the DD. TIME: %d min(s) %d sec(s).", name, Minutes, Seconds);
SendClientMessageToAll(COLOR_GREEN,sentence2);
SendClientMessage(playerid,COLOR_YELLOW,"You have win the DD! You have received 10000$!!!");
GivePlayerMoney(playerid,10000);
SetPlayerScore(playerid,GetPlayerScore(playerid)+10);
if(systemSS == 1 && gTime != 0) {
CheckAgainstHighScore(playerid, gTime);
}
SetTimer("AfterDD",10000,0);
gTimeConfirm = 0;
confirm = 0;
confirmex = 0;
KillTimer(gTimerConfirm);
KillTimer(timercheckpoint);
for (new i=0; i<MAX_PLAYERS; i++) {
TogglePlayerControllable(i,0);
}
} else {
SendClientMessage(playerid,COLOR_DARKRED,"In the BR arena there are still pilots! Kill them!");
}
} else {
GameTextForPlayer(playerid,"~r~DD ~w~isnt currently ~r~initialized.",3000,3);
}
return 1;
}
if(strcmp(cmd,"/hud",true)==0) {
if(confirmcomp[playerid] == 0) {
if(GetPlayerMoney(playerid) >= 1000) {
new name[MAX_PLAYER_NAME];
new tmp[256];
new pid;
GetPlayerName(playerid,name,sizeof(name));
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_RED,"Usage: /hud [hudid]");
ResetForAdvise(playerid);
return 1;
}
pid = strval(tmp);
switch(pid) {
case 1:confirmhud[playerid] = 1;
case 2:confirmhud[playerid] = 2;
case 3:confirmhud[playerid] = 3;
default:GivePlayerMoney(playerid,-1000);
}
if(pid < 1 || pid > 3) {
SendClientMessage(playerid,COLOR_RED,"Invalid HUD ID!");
ResetForAdvise(playerid);
} else {
format(string,sizeof(string),"You have choiced the %d' hud",pid);
SendClientMessage(playerid,0xFF8A00AA,string);
}
} else {
SendClientMessage(playerid, COLOR_RED, "You dont have enough money! Win more races and come back!");
}
} else {
new stringhud[256];
Kick(playerid);
format(stringhud,sizeof(stringhud),"%s kicked for tried crashing server.");
SendClientMessageToAll(0xC10000AA,stringhud);
}
return 1;
}
if(strcmp(cmd,"/sound",true)==0) {
if(soundplayer[playerid] == 1) {
soundplayer[playerid] = 0;
sound=SetTimer("Sound",1,1);
SendClientMessage(playerid,0xFF8A00AA,"You have disabled any sound.");
} else {
soundplayer[playerid] = 1;
SendClientMessage(playerid,0xFF8A00AA,"You have enabled any sound.");
KillTimer(sound);
}
return 1;
}
if(strcmp(cmd,"/kill",true)==0) {
if(confirmcomp[playerid] == 0) {
SetPlayerHealth(playerid,0);
}
else {
SendClientMessage(playerid,0xC10000AA,"During the races, the command /kill is disabled.");
}
return 1;
}
if(strcmp(cmd,"/exit",true)==0) {
if(confirmcomp[playerid] == 1 || confirmcomp[playerid] == 2 || confirmcomp[playerid] == 3) {
new name[MAX_PLAYER_NAME];
reason = "Leaving";
ResetVariablesForPlayer(playerid);
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"%s left the race (%d) (%s)",name,races,reason);
SendClientMessageToAll(COLOR_GREY,string);
} else {
SendClientMessage(playerid,COLOR_RED,"You are already out from stadium interior!");
}
return 1;
}
if(strcmp(cmd,"/out",true)==0) {
if(IsPlayerAdmin(playerid)) {
new tmp[256];
new pid;
new name[MAX_PLAYER_NAME];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_RED,"Usage: /out [playerid]");
}
pid = strval(tmp);
GetPlayerName(pid,name,sizeof(name));
reason = "Kicked";
format(string,sizeof(string),"%s left the race (%d) (%s)",name,races,reason);
SendClientMessageToAll(0xFF8A00AA,string);
ResetVariablesForPlayer(pid);
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/bonuslock",true)==0) {
if(IsPlayerAdmin(playerid) == 1) {
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
if(SYSTEMBONUS == 1) {
if(bonusex == 1) {
bonusex = 0;
EnableStuntBonusForAll(0);
format(string, sizeof(string), "The Admin %s has disabled the Bonus Mode.", name);
SendClientMessageToAll(0xFF8A00AA,string);
}else{
bonusex = 1;
EnableStuntBonusForAll(1);
format(string, sizeof(string), "The Admin %s has enabled the Bonus Mode.", name);
SendClientMessageToAll(0xFF8A00AA,string);
}
}else{
SendClientMessage(playerid,0xFF8A00AA,"Stunt Bonus system is disabled via INI");
}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/bonus",true)==0) {
if(SYSTEMBONUS == 1) {
if(bonusex == 1) {
if(bonus[playerid] == 1) {
SendClientMessage(playerid,0xFF8A00AA,"You have disabled to yourself the Bonus Mode.");
EnableStuntBonusForPlayer(playerid,0);
bonus[playerid] = 0;
}else{
SendClientMessage(playerid,0xFF8A00AA,"You have enabledto yourself the Bonus Mode.");
EnableStuntBonusForPlayer(playerid,1);
bonus[playerid] = 1;
}
}else{SendClientMessage(playerid,COLOR_RED,"Bonus Mode is already disabled!");}
}else{SendClientMessage(playerid,0xFF8A00AA,"Stunt Bonus system is disabled via INI");}
return 1;
}
if(strcmp(cmd,"/hudlock",true)==0) {
if(IsPlayerAdmin(playerid)) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(inspeedo == 1) {
format(string,sizeof(string),"The Admin %s has disabled the speedometer function.",name);
SendClientMessageToAll(0xFF8A00AA,string);
inspeedo = 0;
} else {
format(string,sizeof(string),"The Admin %s has enabled the speedometer function.",name);
SendClientMessageToAll(0xFF8A00AA,string);
inspeedo = 1;
}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/clock",true)==0) {
if(restart == 2) {
if(clockex == 1) {
if(bonusclock[playerid] == 1) {
SendClientMessage(playerid,0xFF8A00AA,"You have disabled to yourself the Clock Mode.");
bonusclock[playerid] = 0;
}else{
SendClientMessage(playerid,0xFF8A00AA,"You have enabled to yourself the Clock Mode.");
bonusclock[playerid] = 1;
}}
}else{SendClientMessage(playerid,0xFF8A00AA,"Clock system is disabled via INI");}
return 1;
}
if(strcmp(cmd,"/clocklock",true)==0) {
if(IsPlayerAdmin(playerid)) {
if(restart == 2) {
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
if(clockex == 1) {
format(string,sizeof(string),"The Admin %s has disabled the Clock function.",name);
SendClientMessageToAll(0xFF8A00AA,string);
clockex = 0;
} else {
format(string,sizeof(string),"The Admin %s has enabled the Clock function.",name);
SendClientMessageToAll(0xFF8A00AA,string);
for(new i=0; i<MAX_PLAYERS; i++){TogglePlayerClock(i,0); bonusclock[i] = 0;}
clockex = 1;
}}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/cdforall",true)==0) {
if(IsPlayerAdmin(playerid)) {
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
if(forall == 1) {
format(string,sizeof(string),"The Admin %s has maked public the CountDown Function.",name);
forall = 0;
}else{
format(string,sizeof(string),"The Admin %s has unmaked public the CountDown Function.",name);
forall = 1;
}
SendClientMessageToAll(0xFF8A00AA,string);
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd, "/restart", true)==0) {
if(IsPlayerAdmin(playerid)) {
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname, sizeof(pname));
if(restart == 1) {
restart = 0;
format(string, sizeof(string), "The Admin %s has disabled the restart mode.", pname);
} else {
restart = 1;
format(string, sizeof(string), "The Admin %s has enabled the restart mode.", pname);
}
SendClientMessageToAll(0xFF8A00AA,string);
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/confirmtime",true)==0) {
if(IsPlayerAdmin(playerid)) {
new name[MAX_PLAYER_NAME];
new tmp[256];
GetPlayerName(playerid,name,sizeof(name));
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF8A00AA,"You have setted the default CT.");
CONFIRMTIME = 60;
return 1;
}
CONFIRMTIME = strval(tmp);
format(string,sizeof(string),"The Admin %s has setted the CT to %d seconds.",name,CONFIRMTIME);
SendClientMessageToAll(NICE_BLUE,string);
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/racetime", true)==0) {
if(IsPlayerAdmin(playerid)) {
new name[MAX_PLAYER_NAME];
new tmp[256];
GetPlayerName(playerid,name,sizeof(name));
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF8A00AA,"You have setted the default RT.");
TIMELIMIT = 5;
return 1;
}
TIMELIMIT = strval(tmp);
format(string,sizeof(string),"The Admin %s has setted the RT to %d minutes.",name,TIMELIMIT);
SendClientMessageToAll(NICE_BLUE,string);
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/racetype", true)==0) {
if(IsPlayerAdmin(playerid)) {
new name[MAX_PLAYER_NAME];
new tmp[256];
new pid;
new stringforadvise[256];
tmp = strtok(cmdtext,idx);
GetPlayerName(playerid,name,sizeof(name));
if(!strlen(tmp)) {
format(string,sizeof(string),"The Admin %s has restarted this race (%d)",name,races);
SendClientMessageToAll(0xFF8A00AA,string);
ResetVariables();
return 1;
}
pid = strval(tmp);
if(pid < 1 || pid > 3) {
SendClientMessage(playerid,COLOR_RED,"Invalid race ID!");
ResetAdvise(playerid);
} else {
races = pid;
format(stringforadvise,sizeof(stringforadvise),"The Admin %s has loaded the follow race: (%d)",name,races);
SendClientMessageToAll(0xFF8A00AA,stringforadvise);
ResetVariables();
}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/shoplock", true)==0) {
if(IsPlayerAdmin(playerid)) {
if(races == BloodRing) {
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname, sizeof(pname));
if(shop == 1) {
shop = 0;
format(string, sizeof(string), "The Admin %s has disabled the /shop command.", pname);
SendClientMessageToAll(0xFF8A00AA,string);
} else {
shop = 1;
format(string, sizeof(string), "The Admin %s has enabled the /shop command.", pname);
SendClientMessageToAll(0xFF8A00AA,string);
}
} else {
SendClientMessage(playerid,COLOR_RED,"The current race isnt BloodRing");
}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/vehicles",true)==0) {
if(IsPlayerAdmin(playerid)) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(vehicles == 0) {
vehicles = 1;
if(FUNMODE !=1){modelid=494;}else{modelid=545;}
CreateVehicle(modelid,2657.4302,-1691.9403,9.2098,271.0485,-1,-1,0);
CreateVehicle(modelid,2657.4551,-1697.0164,9.2118,269.9745,-1,-1,0);
CreateVehicle(modelid,2657.4424,-1701.9327,9.2117,269.7704,-1,-1,0);
CreateVehicle(modelid,2657.3088,-1707.0720,9.2127,269.3252,-1,-1,0);
CreateVehicle(modelid,2657.8540,-1711.8798,9.2138,269.3959,-1,-1,0);
CreateVehicle(modelid,2657.8936,-1797.4159,9.1982,272.6050,-1,-1,0);
CreateVehicle(modelid,2657.7500,-1802.7197,9.1962,273.4662,-1,-1,0);
CreateVehicle(modelid,2657.8950,-1807.7926,9.1966,274.0525,-1,-1,0);
CreateVehicle(modelid,2658.6101,-1812.8348,9.2015,278.5288,-1,-1,0);
CreateVehicle(modelid,2659.3052,-1817.7943,9.2036,281.2562,-1,-1,0);
CreateVehicle(modelid,2660.2214,-1822.8424,9.2013,281.1157,-1,-1,0);
CreateVehicle(modelid,2661.5574,-1828.9178,9.2045,287.7770,-1,-1,0);
CreateVehicle(modelid,2664.1047,-1833.9069,9.2121,293.9963,-1,-1,0);
CreateVehicle(modelid,2676.1936,-1821.7805,9.2692,128.9249,-1,-1,0);
CreateVehicle(modelid,2679.5317,-1825.6537,9.2821,127.6328,-1,-1,0);
CreateVehicle(modelid,2682.7834,-1830.0123,9.2981,137.7449,-1,-1,0);
CreateVehicle(modelid,2687.1802,-1833.0249,9.3178,145.1366,-1,-1,0);
CreateVehicle(modelid,2691.0295,-1836.0249,9.3349,148.2618,-1,-1,0);
CreateVehicle(modelid,2695.4365,-1838.0490,9.3515,147.7731,-1,-1,0);
CreateVehicle(modelid,2701.0098,-1841.0892,9.3709,158.8108,-1,-1,0);
CreateVehicle(modelid,2706.5286,-1843.1526,9.3903,158.8043,-1,-1,0);
CreateVehicle(modelid,2711.0559,-1844.8551,9.4055,159.1338,-1,-1,0);
CreateVehicle(modelid,2715.9304,-1846.4456,9.4213,161.0680,-1,-1,0);
CreateVehicle(modelid,2727.9265,-1876.2178,9.4683,358.9196,-1,-1,0);
CreateVehicle(modelid,2732.8816,-1876.2985,9.4911,0.1795,-1,-1,0);
CreateVehicle(modelid,2738.1094,-1876.0620,9.5143,358.2287,-1,-1,0);
CreateVehicle(modelid,2742.8850,-1875.6405,9.5375,0.2576,-1,-1,0);
CreateVehicle(modelid,2747.9968,-1876.4258,9.5578,359.9487,-1,-1,0);
CreateVehicle(modelid,2752.9285,-1876.4219,9.5770,359.3030,-1,-1,0);
CreateVehicle(modelid,2757.9861,-1876.1254,9.5979,359.9707,-1,-1,0);
CreateVehicle(modelid,2762.9438,-1876.1414,9.6180,359.1446,-1,-1,0);
CreateVehicle(modelid,2768.1377,-1875.9906,9.6399,359.7998,-1,-1,0);
CreateVehicle(modelid,2772.6965,-1876.2081,9.6608,359.0302,-1,-1,0);
CreateVehicle(modelid,2777.8113,-1876.5840,9.6861,1.7872,-1,-1,0);
CreateVehicle(modelid,2782.9980,-1876.4041,9.7075,0.3765,-1,-1,0);
CreateVehicle(modelid,2788.2349,-1875.9457,9.7277,1.2514,-1,-1,0);
CreateVehicle(modelid,2793.1633,-1876.3110,9.7481,0.0172,-1,-1,0);
CreateVehicle(modelid,2797.9434,-1876.2402,9.7658,0.6759,-1,-1,0);
CreateVehicle(modelid,2802.8694,-1876.1327,9.7853,359.9715,-1,-1,0);
CreateVehicle(modelid,2741.6460,-1851.1934,9.5361,180.4083,-1,-1,0);
CreateVehicle(modelid,2747.7285,-1850.4552,9.5582,192.2457,-1,-1,0);
CreateVehicle(modelid,2753.1465,-1848.5200,9.5842,196.8706,-1,-1,0);
CreateVehicle(modelid,2757.8652,-1846.7821,9.6049,198.4232,-1,-1,0);
CreateVehicle(modelid,2762.1807,-1845.2701,9.6254,198.7941,-1,-1,0);
CreateVehicle(modelid,2767.0723,-1843.5389,9.6410,198.9184,-1,-1,0);
CreateVehicle(modelid,2771.5100,-1841.7369,9.6560,199.1967,-1,-1,0);
CreateVehicle(modelid,2776.3613,-1839.9814,9.6736,200.1438,-1,-1,0);
CreateVehicle(modelid,2780.9204,-1838.1604,9.6864,210.2694,-1,-1,0);
CreateVehicle(modelid,2784.8201,-1834.9185,9.7090,219.9627,-1,-1,0);
CreateVehicle(modelid,2809.7383,-1837.0414,9.8167,88.5468,-1,-1,0);
CreateVehicle(modelid,2810.1211,-1832.0221,9.8193,86.9948,-1,-1,0);
CreateVehicle(modelid,2810.5938,-1827.1202,9.8215,87.3319,-1,-1,0);
CreateVehicle(modelid,2810.7991,-1822.1289,9.8250,87.8446,-1,-1,0);
CreateVehicle(modelid,2823.9624,-1723.4052,9.8996,79.0611,-1,-1,0);
CreateVehicle(modelid,2825.3611,-1718.7465,9.9023,77.5213,-1,-1,0);
CreateVehicle(modelid,2825.8503,-1714.1124,9.9041,77.3868,-1,-1,0);
CreateVehicle(modelid,2827.3562,-1709.1260,9.8996,75.7392,-1,-1,0);
CreateVehicle(modelid,2828.4224,-1704.2609,9.8952,76.5805,-1,-1,0);
CreateVehicle(modelid,2829.2300,-1699.4203,9.8913,76.1593,-1,-1,0);
CreateVehicle(modelid,2830.9197,-1694.5520,9.8944,74.6891,-1,-1,0);
CreateVehicle(modelid,2831.9480,-1689.8146,9.8931,73.7990,-1,-1,0);
CreateVehicle(modelid,2827.8010,-1672.4968,9.8693,179.4928,-1,-1,0);
CreateVehicle(modelid,2822.6592,-1672.3254,9.8554,179.7763,-1,-1,0);
CreateVehicle(modelid,2817.6580,-1672.1666,9.8419,179.3247,-1,-1,0);
CreateVehicle(modelid,2812.9927,-1672.8624,9.8320,181.3207,-1,-1,0);
CreateVehicle(modelid,2807.8594,-1671.8036,9.8280,179.4332,-1,-1,0);
CreateVehicle(modelid,2802.7737,-1671.6464,9.8197,178.9692,-1,-1,0);
CreateVehicle(modelid,2797.7681,-1671.8566,9.8052,180.7539,-1,-1,0);
CreateVehicle(modelid,2792.7153,-1671.7783,9.7923,179.9045,-1,-1,0);
CreateVehicle(modelid,2787.7898,-1672.0775,9.7700,178.3382,-1,-1,0);
if(FUNMODE !=1){modelid=504;}else{modelid=466;}
CreateVehicle(modelid,-2133.5378,-435.0716,35.1284,81.4936,-1,-1,0);
CreateVehicle(modelid,-2133.2305,-432.4738,35.1284,82.0117,-1,-1,0);
CreateVehicle(modelid,-2132.7981,-429.6905,35.1285,81.9744,-1,-1,0);
CreateVehicle(modelid,-2132.4780,-427.1351,35.1279,81.3609,-1,-1,0);
CreateVehicle(modelid,-2132.1711,-424.3226,35.1284,82.0235,-1,-1,0);
CreateVehicle(modelid,-2131.5835,-421.5876,35.1286,77.6163,-1,-1,0);
CreateVehicle(modelid,-2130.6384,-418.8047,35.1281,72.1152,-1,-1,0);
CreateVehicle(modelid,-2129.7397,-416.2472,35.1284,71.3947,-1,-1,0);
CreateVehicle(modelid,-2128.7610,-413.5724,35.1285,71.4492,-1,-1,0);
CreateVehicle(modelid,-2127.9094,-410.8508,35.1285,71.0971,-1,-1,0);
CreateVehicle(modelid,-2126.9270,-408.1972,35.1284,69.6979,-1,-1,0);
CreateVehicle(modelid,-2125.6807,-405.4483,35.1284,64.0657,-1,-1,0);
CreateVehicle(modelid,-2133.1904,-453.5941,35.1284,96.8648,-1,-1,0);
CreateVehicle(modelid,-2132.9060,-456.2692,35.1285,96.8977,-1,-1,0);
CreateVehicle(modelid,-2132.5034,-459.0496,35.1283,99.0267,-1,-1,0);
CreateVehicle(modelid,-2132.0354,-461.7968,35.1295,100.5006,-1,-1,0);
CreateVehicle(modelid,-2131.5254,-464.4614,35.1309,102.0812,-1,-1,0);
CreateVehicle(modelid,-2130.8616,-467.1248,35.1319,104.6905,-1,-1,0);
CreateVehicle(modelid,-2129.9624,-469.9738,35.1315,108.2642,-1,-1,0);
CreateVehicle(modelid,-2129.2622,-472.7121,35.1316,109.8431,-1,-1,0);
CreateVehicle(modelid,-2128.0283,-475.4022,35.1345,113.9697,-1,-1,0);
CreateVehicle(modelid,-2127.0918,-478.4668,35.1355,119.2266,-1,-1,0);
CreateVehicle(modelid,-2126.0144,-481.2338,35.1356,114.3974,-1,-1,0);
CreateVehicle(modelid,-2124.7444,-483.8293,35.1355,116.3322,-1,-1,0);
if(FUNMODE !=1){modelid=468;}else{modelid=463;}
CreateVehicle(modelid,1078.4895,1600.0778,12.2160,27.7301,-1,-1,0);
CreateVehicle(modelid,1077.6520,1599.5469,12.2157,35.5050,-1,-1,0);
CreateVehicle(modelid,1076.8423,1599.0785,12.2154,34.4441,-1,-1,0);
CreateVehicle(modelid,1076.2213,1598.6139,12.2159,39.9685,-1,-1,0);
CreateVehicle(modelid,1075.5127,1597.9473,12.2152,44.0492,-1,-1,0);
CreateVehicle(modelid,1074.8951,1597.2598,12.2159,49.8840,-1,-1,0);
CreateVehicle(modelid,1074.0717,1596.8270,12.2148,47.8889,-1,-1,0);
CreateVehicle(modelid,1073.1863,1596.0118,12.2155,44.7564,-1,-1,0);
CreateVehicle(modelid,1072.3514,1595.4784,12.2158,41.7029,-1,-1,0);
CreateVehicle(modelid,1071.7710,1594.9167,12.2156,47.3763,-1,-1,0);
CreateVehicle(modelid,1071.0951,1594.2548,12.2159,42.9456,-1,-1,0);
CreateVehicle(modelid,1070.0392,1593.6407,12.2159,36.2484,-1,-1,0);
CreateVehicle(modelid,1116.2870,1600.3636,12.2198,333.5197,-1,-1,0);
CreateVehicle(modelid,1117.1973,1599.9658,12.2190,334.6485,-1,-1,0);
CreateVehicle(modelid,1117.7184,1599.3870,12.2174,334.9947,-1,-1,0);
CreateVehicle(modelid,1118.6207,1598.6100,12.2161,322.7865,-1,-1,0);
CreateVehicle(modelid,1119.2236,1598.1572,12.2158,318.2094,-1,-1,0);
CreateVehicle(modelid,1119.7817,1597.3749,12.2148,323.3851,-1,-1,0);
CreateVehicle(modelid,1120.6411,1596.9292,12.2156,335.5393,-1,-1,0);
CreateVehicle(modelid,1121.2776,1596.3806,12.2151,325.7973,-1,-1,0);
CreateVehicle(modelid,1121.8617,1596.0977,12.2151,330.8820,-1,-1,0);
CreateVehicle(modelid,1122.4949,1595.7805,12.2157,324.8096,-1,-1,0);
CreateVehicle(modelid,1123.2504,1595.0442,12.2155,317.9193,-1,-1,0);
CreateVehicle(modelid,1123.7864,1594.6935,12.2154,326.5702,-1,-1,0);
format(string,sizeof(string),"The Admin %s has enabled the Vehicles Mode.",name);
SendClientMessageToAll(0xFF8A00AA,string);
} else {
vehicles = 0;
format(string,sizeof(string),"The Admin %s has disabled the Vehicles Mode.",name);
SendClientMessageToAll(0xFF8A00AA,string);
for(new i=0; i<MAX_VEHICLES; i++) {
DestroyVehicle(i);
}
if(FUNMODE !=1){modelid=494;}else{modelid=545;}
CreateVehicle(modelid,2676.7234,-1672.3975,9.2934,179.9965,2,3,0);
if(FUNMODE !=1){modelid=444;}else{modelid=460;}
CreateVehicle(modelid,2686.7639,-1671.8143,9.8168,179.0177,79,3,0);
if(FUNMODE !=1){modelid=504;}else{modelid=466;}
CreateVehicle(modelid,-2160.1582,-409.1746,35.1283,230.6400,77,77,0);
if(FUNMODE !=1){modelid=573;}else{modelid=514;}
CreateVehicle(modelid,1092.2767,1612.4164,13.1973,151.3612,3,4,0);
if(FUNMODE !=1){modelid=424;}else{modelid=568;}
CreateVehicle(modelid,1103.4581,1615.7324,12.3282,209.1826,2,3,0);
for(new p=0; p<MAX_PLAYERS; p++) {
SetVehicleParamsForPlayer(1,p,0,1);
SetVehicleParamsForPlayer(2,p,0,1);
SetVehicleParamsForPlayer(3,p,0,1);
SetVehicleParamsForPlayer(4,p,0,1);
SetVehicleParamsForPlayer(5,p,0,1);
}
}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/bounds",true)==0) {
if(IsPlayerAdmin(playerid)) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(objects == 0) {
objects = 1;
format(string,sizeof(string),"The Admin %s has enabled the World Bounds Modes.",name);
SendClientMessageToAll(0xFF8A00AA,string);
Object();
} else {
for(new i=0; i<MAX_OBJECTS; i++) {
DestroyObject(i);
}
objects = 0;
format(string,sizeof(string),"The Admin %s has disabled the World Bounds Modes.",name);
SendClientMessageToAll(0xFF8A00AA,string);
}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if (strcmp(cmd, "/time", true) == 0) {
new hour,minute,second;
gettime(hour,minute,second);
format(string, sizeof(string), "~g~|~w~%d:0%d~g~|", hour, minute);
GameTextForPlayer(playerid, string, 5000, 1);
return 1;
}
if(strcmp(cmd,"/info",true)==0) {
if(IsPlayerAdmin(playerid)) {
new tmp[256],tmp1[256],tmp2[256],tmp3[256],tmp4[256];
SendClientMessage(playerid,0xFF8A00AA,"Current Sunday-Drivers Settings (Getting .INI configuration).");
format(tmp,sizeof(tmp),"Time limit: %d Confirm Time: %d Maximum Players allowed: %d Minimum Players for start the races: %d", TIMELIMIT, CONFIRMTIME, MAXPLAYERS, MINPLAYERS);
format(tmp1,sizeof(tmp1),"Show Markers: %d Show Names: %d Starting weather: %d Starting hour: %d Starting race: %d",SHOWMARKERS, SHOWNAMES, SWEATHER, SHOUR, STARTRACE);
format(tmp2, sizeof(tmp2),"Speedo system: %d VCRS system: %d SSS system: %d SSM system SRC system: %d SDBP system: %d",SPEEDO, VOTERCSYSTEM, SYSTEMSAVESCORE, SYSTEMSAVEMONEY, SYSTEMRACECHAT, SYSTEMDIST);
format(tmp3, sizeof(tmp3),"Vehicles mode: %d Objects mode: %d RWS system: %d Restart system: %d SBS: %d SHL: %d SADM: %d", VEHICLES, OBJECTS, RANDOMW, RESTART, SYSTEMBONUS,SYSTEMHEAL, SYSTEMADMIN);
format(tmp4,sizeof(tmp4),"Betting system: %d Restart Mode: %d",BETTING,RESTART);
SendClientMessage(playerid,0xFF8A00AA,tmp);SendClientMessage(playerid,0xFF8A00AA,tmp1);SendClientMessage(playerid,0xFF8A00AA,tmp2);SendClientMessage(playerid,0xFF8A00AA,tmp3);
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/racechat",true)==0) {
if(IsPlayerAdmin(playerid)) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(SYSTEMRACECHAT == 1) {
if(systemrc == 0) {
systemrc = 1;
format(string,sizeof(string),"The Admin %s has enabled the RaceChat system.",name);
} else {
systemrc = 0;
format(string,sizeof(string),"The Admin %s has disabled the RaceChat system.",name);
}
SendClientMessageToAll(0xFF8A00AA,string);
} else {
SendClientMessage(playerid,COLOR_RED,"SRC system is disabled via INI");
}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/adverts",true)==0) {
if(IsPlayerAdmin(playerid)) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(SYSTEMRACECHAT == 1) {
if(systemrc == 0) {
systemrc = 1;
format(string,sizeof(string),"The Admin %s has enabled the Advertisement system.",name);
} else {
systemrc = 0;
format(string,sizeof(string),"The Admin %s has disabled the Advertisement system.",name);
}
SendClientMessageToAll(0xFF8A00AA,string);
} else {
SendClientMessage(playerid,COLOR_RED,"SRC system is disabled via INI");
}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/savemoney",true)==0) {
if(IsPlayerAdmin(playerid)) {
if(SYSTEMSAVEMONEY == 1) {
if(systemSM == 0) {
systemSM = 1;
format(string,sizeof(string),"The Admin %s has enabled the SSM system.");
} else {
systemSM = 0;
format(string,sizeof(string),"The Admin %s has disabled the SSM system.");
}
SendClientMessageToAll(0xFF8A00AA,string);
} else {
SendClientMessage(playerid,COLOR_RED,"SSM system is disabled via INI");
}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/savescore",true)==0) {
if(IsPlayerAdmin(playerid)) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(SYSTEMSAVESCORE == 1) {
if(systemSS == 0) {
systemSS = 1;
format(string,sizeof(string),"The Admin %s has enabled the SSS system.");
} else {
systemSS = 0;
format(string,sizeof(string),"The Admin %s has disabled the SSS system.");
}
SendClientMessageToAll(0xFF8A00AA,string);
} else {
SendClientMessage(playerid,COLOR_RED,"SSS system is disabled via INI");
}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if(strcmp(cmd,"/votesystem",true)==0) {
if(IsPlayerAdmin(playerid)) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(VOTERCSYSTEM == 1) {
if(systemvrc == 0) {
systemvrc = 1;
format(string,sizeof(string),"The Admin %s has enabled the VoteRC system.");
} else {
systemvrc = 0;
format(string,sizeof(string),"The Admin %s has disabled the VoteRC system.");
}
SendClientMessageToAll(0xFF8A00AA,string);
} else {
SendClientMessage(playerid,COLOR_RED,"VCRS is disabled via INI");
}
} else {
SendClientMessage(playerid,COLOR_RED,"You arent admin!!!");
}
return 1;
}
if (strcmp(cmd, "/startvote", true)==0)
{
if(systemvrc == 1) {
new name[MAX_PLAYER_NAME];
new tmp[256];
GetPlayerName(playerid,name,sizeof(name));
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_RED,"Usage: /startvote [raceid]");
return 1;
}
pidplayer = strval(tmp);
if(pidplayer > 0 && pidplayer < 4) {
if (VoteStatus == 0)
{
GivePlayerMoney(playerid, -5);
format(string, sizeof(string), "%s has started a StadiumRace change vote! (%d)", name, pidplayer);
SendClientMessageToAll(COLOR_SYSTEM,string);
SendClientMessageToAll(COLOR_SYSTEM, "Poll Duration = 60 sec./1 minute");
SendClientMessageToAll(COLOR_SYSTEM, "Type /Yes to vote Yes or /No to vote No.");
VoteStatus = 1;
vtimer = SetTimer("votetimer",60000,0);
}
else if (VoteStatus == 1)
{
SendClientMessage(playerid, COLOR_SYSTEM, "Another poll is already in progress!");
}
} else {
SendClientMessage(playerid,COLOR_RED,"Invalid race ID!");
ResetAdvise(playerid);
}
} else {
SendClientMessage(playerid,COLOR_RED,"VCRS is disabled via INI.");
}
return 1;
}
if (strcmp(cmd, "/votes", true)==0)
{
if(systemvrc == 1) {
format(string, sizeof(string), "Race choiced: %d | Positive votes: %d | Negative votes: %d | Total: %d",pidplayer, Pvotes, Nvotes, Pvotes + Nvotes);
SendClientMessage(playerid, COLOR_SYSTEM, string);
} else {
SendClientMessage(playerid,COLOR_RED,"VCRS is disabled via INI.");
}
return 1;
}
if (strcmp(cmd, "/killvote", true)==0)
{
if(systemvrc == 1) {
if (IsPlayerAdmin(playerid) == 1 && VoteStatus == 1)
{
KillTimer(vtimer);
ResetVoteStats();
SendClientMessageToAll(COLOR_SYSTEM, "An admin has cancelled the poll!");
}
else if (VoteStatus == 0)
{
SendClientMessage(playerid, COLOR_SYSTEM, "There are no active polls!");
}
else if (IsPlayerAdmin(playerid) == 0)
{
SendClientMessage(playerid,COLOR_SYSTEM, "Only Admins can use this!");
}
} else {
SendClientMessage(playerid,COLOR_RED,"VCRS is disabled via INI.");
}
return 1;
}
if (strcmp(cmd, "/votehelp", true)==0)
{
if(systemvrc == 1) {
SendClientMessage(playerid, COLOR_YELLOW, "This poll system will allow you to change the gamemode SR.");
SendClientMessage(playerid, COLOR_YELLOW, "Type /startvote to begin the poll.");
SendClientMessage(playerid, COLOR_YELLOW, "Type /Yes to vote Yes.");
SendClientMessage(playerid, COLOR_YELLOW, "Type /No to vote No.");
SendClientMessage(playerid, COLOR_YELLOW, "Type /votes to see the current total number of votes casted.");
SendClientMessage(playerid, COLOR_YELLOW, "Type /killvote to disable any current polls (Admins only).");
} else {
SendClientMessage(playerid,COLOR_RED,"VCRS is disabled via INI.");
}
return 1;
}
if (strcmp(cmd, "/Yes", true)==0)
{
if(systemvrc == 1) {
if (VoteStatus == 1 && Voted[playerid] == 0)
{
Pvotes++;
SendClientMessage(playerid, COLOR_SYSTEM, "Your vote has been succesfully casted!");
Voted[playerid] = 1;
}
else if (Voted[playerid] == 1)
{
SendClientMessage(playerid, COLOR_SYSTEM, "You have already voted for this poll!");
}
else if (VoteStatus == 0)
{
SendClientMessage(playerid, COLOR_SYSTEM, "There are no active polls!");
}
} else {
SendClientMessage(playerid,COLOR_RED,"VCRS is disabled via INI.");
}
return 1;
}
if (strcmp(cmd, "/No", true)==0)
{
if(systemvrc == 1) {
if (VoteStatus == 1 && Voted[playerid] == 0)
{
Nvotes++;
SendClientMessage(playerid, COLOR_SYSTEM, "Your vote has been succesfully casted!");
Voted[playerid] = 1;
}
else if (Voted[playerid] == 1)
{
SendClientMessage(playerid, COLOR_SYSTEM, "You have already voted for this poll!");
}
else if (VoteStatus == 0)
{
SendClientMessage(playerid, COLOR_SYSTEM, "There are no active polls!");
}
} else {
SendClientMessage(playerid,COLOR_RED,"VCRS is disabled via INI.");
}
return 1;
}
if (strcmp(cmd, "/lock", true)==0)
{
if(vehicles == 1) {
if(IsPlayerInAnyVehicle(playerid))
{
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_YELLOW,"You are not a driver");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
if(i != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
}
}
SendClientMessage(playerid, COLOR_YELLOW, "Car locked!");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1056,pX,pY,pZ);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You aren' t driving a car!");
}
} else {
SendClientMessage(playerid,COLOR_RED,"The Vehicles Mode has been disabled.");
}
return 1;
}
if (strcmp(cmd, "/unlock", true)==0)
{
if(vehicles == 1) {
if(IsPlayerInAnyVehicle(playerid))
{
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_YELLOW,"You are not a driver!");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
}
SendClientMessage(playerid, COLOR_YELLOW, "Car unlocked!");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1057,pX,pY,pZ);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You aren' t driving a car!");
}
} else {
SendClientMessage(playerid,COLOR_RED,"The Vehicles Mode has been disabled.");
}
return 1;
}
return 0;
}