E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(752) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(758) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(774) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(784) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(801) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(813) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(823) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(835) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(853) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(868) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(881) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(889) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(898) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(904) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(909) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(915) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(921) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(931) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(940) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(949) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(959) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(968) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(977) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(986) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(995) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1004) : error: 079: inconsistent return types (array & non-array)
return 1;
Preciso de uma ajudinha com esses erros tensos.
pawn Код:
pawn Код:
|
Isso indica que vocк estб usando "Tipos de retorno inconsistentes", ou seja, em um ponto vocк estб retornando a uma string, e depois retornando a um valor inteiro (Integer), e vocк nгo pode fazer isso. Entretanto, por ser em tantas linhas, prуximas, como mostrado, acredito que possa ser uma simples chave (}) que vocк tenha esquecido de fechar, da qual, й responsбvel, na maioria dos casos, em erros semelhantes.
|
As causas que eu disse acima sгo as ъnicas para tal erro. Poste aproximadamente 4-5 linhas ao redor de uma das linhas do erro, ou toda a funзгo aonde estб sendo causado.
|
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
new sendername[MAX_PLAYER_NAME];
new tmp[128];
cmd = strtok(cmdtext, idx);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i)){
new stringcmd[256];
new playa[MAX_PLAYER_NAME];
GetPlayerName(playerid, playa,MAX_PLAYER_NAME);
format(stringcmd, 256, "[BCS - Admin] O jogador %s (D:%d) digitou o comando: %s", playa,playerid,cmdtext);
SendClientMessage(i,0x82C0FFAA,stringcmd);
}
}
if(strcmp(cmd, "/pm", true) == 0)
{
new pname[MAX_PLAYER_NAME], id2, msg1[256], msg2[256], aname5[MAX_PLAYER_NAME];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "Ч Use: /pm [id] [mensagem]");
}
id2 = strval(tmp);
if(!IsPlayerConnected(id2) || id2 == playerid)
{
SendClientMessage(playerid, COLOR_RED, "[ERRO] ID invбlido.");
}
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, "Ч Digite uma mensagem.");
}
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerName(id2, aname5, sizeof(aname5));
format(msg1, 256, "» [ENVIADO] para %s (%d): %s", aname5, id2, result);
format(msg2, 256, "» [RECEBIDO] de %s (%d): %s", pname, playerid, result);
SendClientMessage(playerid, PM_OUTGOING_COLOR, msg1);
SendClientMessage(id2, PM_INCOMING_COLOR, msg2);
PlayerPlaySound(id2, 1085,0.0,0.0,0.0);
GameTextForPlayer(id2,"~g~M~g~ensagem recebida!",1000,3);
return 1;
}
if (strcmp("/comandos", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
SendClientMessage(playerid, COLOR_GREEN," Comandos");
SendClientMessage(playerid, COLOR_YELLOW,"/creditos = Para ver os crйditos do servidor.");
SendClientMessage(playerid, COLOR_GREEN,"/regras = Para ver as regras do servidor.");
SendClientMessage(playerid, COLOR_YELLOW,"/kill = Para se matar.");
SendClientMessage(playerid, COLOR_GREEN,"/pm [ID] [Mesagem} = para enviar uma mesagem privada.");
SendClientMessage(playerid, COLOR_YELLOW,"/teleportes = Para ver os teleportes do server.");
SendClientMessage(playerid, COLOR_GREEN,"/animlist = Para ver a lista de animaзхes.");
SendClientMessage(playerid, COLOR_YELLOW,"/relatorio [texto] = Para enviar um relatуrio aos nossos admins.");
SendClientMessage(playerid, COLOR_YELLOW,"/afk = Para ficar e sair AFK ( Ausente do jogo ).");
SendClientMessage(playerid, COLOR_YELLOW,"/p = Chat prуximo.");
SendClientMessage(playerid, COLOR_WHITE,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
return 1;
}
if(strcmp("/regras", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
SendClientMessage(playerid, COLOR_YELLOW," Regras");
SendClientMessage(playerid, COLOR_GREEN,"Nunca faзa DB(Drive-by). Pois poderб ser kickado.");
SendClientMessage(playerid, COLOR_GREEN,"Nunca use nenhum tipo de cheater para tirar vantagem sobre os players. Pois,");
SendClientMessage(playerid, COLOR_GREEN,"poderar levar um mero kick. Mas tambйm poderб levar um ban eterno.");
SendClientMessage(playerid, COLOR_GREEN,"Nгo faзa Spawn-kill. Pois poderб ser kickado.");
SendClientMessage(playerid, COLOR_WHITE,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
return 1;
}
if(strcmp("/teleportes", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
SendClientMessage(playerid, COLOR_GREEN," Teleportes");
SendClientMessage(playerid, COLOR_YELLOW,"/jizzy || /bayside || /psf || /derby || /area51 || /zombotech");
SendClientMessage(playerid, COLOR_YELLOW,"/sanfierro || /lasventuras || /lossantos || /ammu");
SendClientMessage(playerid, COLOR_WHITE,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
return 1;
}
if(strcmp("/creditos", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_GREEN,"» ~~~~~~~~~~~~~~~~~ Crйditos ~~~~~~~~~~~~~~~~~ «");
SendClientMessage(playerid, COLOR_WHITE,"» Game Mode desenvolvido por Wendell Rocha e Hardware.");
SendClientMessage(playerid, COLOR_WHITE,"» Admin Script por: Hardware e Wendell.");
SendClientMessage(playerid, COLOR_WHITE,"» Scripter: Wendell Rocha e Hardware.");
SendClientMessage(playerid, COLOR_WHITE,"» Mapper: Wendell Rocha.");
SendClientMessage(playerid, COLOR_WHITE,"» Game Mode 4Fun. Entгo divirta-se. :D");
SendClientMessage(playerid, COLOR_GREEN,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
return 1;
}
if(strcmp("/loja", cmdtext, true, 10) == 0)
{
new aname[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid, aname, sizeof(aname));
format(string, sizeof(string), "[SERVER] O player %s estб comprando armas na loja do ammu.Pra ir no Ammu, comprar armas digite:(/ammu)", aname,playerid);
if(IsPlayerInCheckpoint(playerid)== cpcheck)
{
SendClientMessageToAll(0x80FF80AA,string);
ShowPlayerDialog(playerid,LOJA,DIALOG_STYLE_LIST,"Loja de Armas","9mm $2.000\nDesert Eagle $4.000\nShotgun $6.000\nSawn $6.500\nCombat Shotgun $7.000\nMicro SMG $8.400\nMP5 $9.000\nAK-47 $13.000\nM4 $15.000\nTec9 $8.500\nSniper Rifle $16.000","Comprar","Cancelar");
}
else
{
SendClientMessage(playerid,0xFF0000AA ,"[ERRO]Vocк nгo estб no checkpoint do Ammu Nation de Las Venturas");
}
return 1;
}
if(strcmp(cmdtext, "/afk", true) == 0)
{
if(afk[playerid] == 0)
{
afk[playerid] = 1;
new aname4[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid,aname4,sizeof(aname4));
format(string,sizeof(string),"~w~O player ~p~%s ~w~esta AFK. caso voce tambem queria ficar afk, digite /afk",aname4,playerid);
GameTextForAll(string,2200,4);
TogglePlayerControllable(playerid,0);
SendClientMessage(playerid,0xFF8080AA,"{FFFFFF}[INFO]{FF8080} » Para voltar ao normal, digite /afk novamente!");
}
else if(afk[playerid] == 1)
{
afk[playerid] = 0;
new aname6[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid,aname6,sizeof(aname6));
format(string,sizeof(string),"~w~O player ~p~%s ~w~ voltou.",aname6,playerid);
GameTextForAll(string,2200,4);
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid,0x8080FFAA,"{FFFFFF}[INFO]{FF8080} » Vocк jб estб liberado e pode se divertir novamente.");
return 1;
}
if(!strcmp(cmdtext, "/anims", true))
{
SendClientMessage(playerid, COLOR_YELLOW,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
SendClientMessage(playerid, COLOR_WHITE," »/bebado || /sentar || /deitar || /abaixar || /animsoff");
SendClientMessage(playerid, COLOR_YELLOW,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
return 1;
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//- Animaзхes:
if(strcmp("/bebado", cmdtext, true) == 0)
{
ApplyAnimation(playerid, "PED", "WALK_DRUNK", 4.0, 1, 1, 1, 1, 0);
return 1;
}
if(strcmp("/deitar", cmdtext, true) == 0)
{
ApplyAnimation(playerid, "BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
return 1;
}
if(strcmp("/abaixar", cmdtext, true) == 0)
{
ApplyAnimation(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0);
return 1;
}
if(strcmp("/sentar", cmdtext, true) == 0)
{
ApplyAnimation(playerid, "BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0);
return 1;
}
if(!strcmp(cmdtext, "/animsoff", true))
{
ClearAnimations(playerid);
return 1;
}
//- ~~~~~~~~~~~~~~~~~~~~~~~~ Teleportes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (strcmp("/jizzy", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente danзando na boate do cafetгo Jizzy. Quer ir tambйm? Use:{8080FF}(/jizzy){FFFFFF}");
SetPlayerPos(playerid,-2656.87,1410.10,910.8563);
SetPlayerInterior(playerid,3);
SendClientMessage(playerid,COLOR_WHITE,"[INFO] Vocк estб na boate do Jizzy.");
return 1;
}
if (strcmp("/derby", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente querendo se matar no Derby. Quer ir tambйm? Use:{8080FF}(/derby){FFFFFF}");
SetPlayerPos(playerid,-1881.79,936.9179,1036.44);
SetPlayerInterior(playerid,15);
SendClientMessage(playerid,COLOR_WHITE,"[INFO] Vocк estб no Derby.");
return 1;
}
if(strcmp("/bayside", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente indo passear em Bayside. Quer ir tambйm? Use:{8080FF}(/bayside){FFFFFF}");
SetPlayerPos(playerid,-2261.89,2311.94,5.51954);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO] Bom passeio. :D");
return 1;
}
if(strcmp("/psf", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente pulando de paraquedas em San Fierro. Quer ir tambйm? Use:{8080FF}(/paraquedassf){FFFFFF}");
SetPlayerPos(playerid,-1753.90,885.0483,295.9863);
GivePlayerWeapon(playerid, 46, 1);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO]Divirta-se. Mas nгo se mate :D.");
return 1;
}
if(strcmp("/zombotech", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente procurando zombi na Zombotech. Quer ir tambйm? Use:{8080FF}(/zombotech){FFFFFF}");
SetPlayerPos(playerid,-1958.92,705.8999,48.3775);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO][AVISO]Aqui nгo tem zombi. Mas vale a pena dar uma investigada aqui :D");
return 1;
}
if(strcmp("/sanfierro", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente indo passear em San Fierro. Quer ir tambйm? Use:{8080FF}(/sanfierro){FFFFFF}");
SetPlayerPos(playerid,-1951.68,294.3752,35.7250);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO]Bom passeio :D");
return 1;
}
if(strcmp("/lasventuras", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente indo passear em Las Venturas. Quer ir tambйm? Use:{8080FF}(/lasventuras){FFFFFF}");
SetPlayerPos(playerid,2196.19,1676.82,12.3671);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO]Bom passeio :D");
return 1;
}
if(strcmp("/lossantos", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente indo passear em Los Santos. Quer ir tambйm? Use:{8080FF}(/lossantos){FFFFFF}");
SetPlayerPos(playerid,2495.0720,-1687.5278,13.5150);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid, COLOR_WHITE,"[INFO]Bom passeio :D");
return 1;
}
if (strcmp("/area51", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente querendo DM na Бrea 51. Quer ir tambйm? Use:{8080FF}(/area51){FFFFFF}");
SetPlayerPos(playerid,72.4161,1917.32,17.6406);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO] Vocк estб na Бrea 51.");
return 1;
}
if(strcmp("/ammu", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente indo comprar armas. Quer ir tambйm? Use: {8080FF}(/ammu){FFFFFF}");
SetPlayerPos(playerid,2155.8499,944.0530,10.8203);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO] Vocк estб na Ammu Nation!");
return 1;
}
if(strcmp("/relatorio",cmdtext, true, 10) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
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, 0x6FDD00AA, "[x] Use: /relatorio [texto]");
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (IsPlayerAdmin(i))
{
new stringre[256];
format(stringre, sizeof(stringre), "{0080FF}| RELATУRIO |{FFFFFF} Chegou um relatуrio de %s:{408080} %s{FFFFFF}", sendername, (result));
SendClientMessage(i,0xECEC00AA,stringre);
SendClientMessage(playerid, 0xFF8080AA, "[INFO] O seu relatуrio foi enviado a nossos adminstradores,obrigado !");
}
return 1;
}
}
}
}
if(strcmp("/autotuning", cmdtext, true, 10) == 0)
{
new idveiculo;
idveiculo = GetPlayerVehicleID(playerid);
if(IsPlayerAdmin(playerid) )
if(IsPlayerInAnyVehicle(playerid) )
AddVehicleComponent(idveiculo, 1010);
AddVehicleComponent(idveiculo, 1020);
AddVehicleComponent(idveiculo, 1080);
AddVehicleComponent(idveiculo, 1087);
AddVehicleComponent(idveiculo, 1086);
SendClientMessage(playerid, 0xFFFFFFAA,"{FF0000}[INFO]{FF0000}Veнculo tunado");
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SendClientMessage(playerid, COLOR_GREEN,"[INFO] Tente nгo se matar! :D");
return 1;
}
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1066) : error: 029: invalid expression, assumed zero
pawn Код:
Код:
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1066) : error: 029: invalid expression, assumed zero |
if(strcmp("/autotuning", cmdtext, true, 10) == 0) { new idveiculo; idveiculo = GetPlayerVehicleID(playerid); if(IsPlayerAdmin(playerid) && IsPlayerInAnyVehicle(playerid)) { AddVehicleComponent(idveiculo, 1010); AddVehicleComponent(idveiculo, 1020); AddVehicleComponent(idveiculo, 1080); AddVehicleComponent(idveiculo, 1087); AddVehicleComponent(idveiculo, 1086); SendClientMessage(playerid, 0xFFFFFFAA,"{FF0000}[INFO]{FF0000}Veнculo tunado"); } return 1; }
#include <a_samp>
#define PM_OUTGOING_COLOR 0x0080FF96
#define PM_INCOMING_COLOR 0xFFA500AA
#define COLOR_RED 0xAA3333AA
#define COLOR_WHITE 0xFFA500AA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_YELLOW 0xFFFF00AA
new afk[MAX_PLAYERS],LOJA,cpcheck;
public OnFilterScriptInit()
{
return 1;
}
stock strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
new sendername[MAX_PLAYER_NAME];
new tmp[128];
cmd = strtok(cmdtext, idx);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i))
{
new stringcmd[256];
new playa[MAX_PLAYER_NAME];
GetPlayerName(playerid, playa,MAX_PLAYER_NAME);
format(stringcmd, 256, "[BCS - Admin] O jogador %s (D:%d) digitou o comando: %s", playa,playerid,cmdtext);
SendClientMessage(i,0x82C0FFAA,stringcmd);
}
}
if(strcmp(cmd, "/pm", true) == 0)
{
new pname[MAX_PLAYER_NAME], id2, msg1[256], msg2[256], aname5[MAX_PLAYER_NAME];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "Ч Use: /pm [id] [mensagem]");
return 1;
}
id2 = strval(tmp);
if(!IsPlayerConnected(id2) || id2 == playerid)
{
SendClientMessage(playerid, COLOR_RED, "[ERRO] ID invбlido.");
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, "Ч Digite uma mensagem.");
return 1;
}
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerName(id2, aname5, sizeof(aname5));
format(msg1, 256, "» [ENVIADO] para %s (%d): %s", aname5, id2, result);
format(msg2, 256, "» [RECEBIDO] de %s (%d): %s", pname, playerid, result);
SendClientMessage(playerid, PM_OUTGOING_COLOR, msg1);
SendClientMessage(id2, PM_INCOMING_COLOR, msg2);
PlayerPlaySound(id2, 1085,0.0,0.0,0.0);
GameTextForPlayer(id2,"~g~M~g~ensagem recebida!",1000,3);
return 1;
}
if (strcmp("/comandos", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
SendClientMessage(playerid, COLOR_GREEN," Comandos");
SendClientMessage(playerid, COLOR_YELLOW,"/creditos = Para ver os crйditos do servidor.");
SendClientMessage(playerid, COLOR_GREEN,"/regras = Para ver as regras do servidor.");
SendClientMessage(playerid, COLOR_YELLOW,"/kill = Para se matar.");
SendClientMessage(playerid, COLOR_GREEN,"/pm [ID] [Mesagem} = para enviar uma mesagem privada.");
SendClientMessage(playerid, COLOR_YELLOW,"/teleportes = Para ver os teleportes do server.");
SendClientMessage(playerid, COLOR_GREEN,"/animlist = Para ver a lista de animaзхes.");
SendClientMessage(playerid, COLOR_YELLOW,"/relatorio [texto] = Para enviar um relatуrio aos nossos admins.");
SendClientMessage(playerid, COLOR_YELLOW,"/afk = Para ficar e sair AFK ( Ausente do jogo ).");
SendClientMessage(playerid, COLOR_YELLOW,"/p = Chat prуximo.");
SendClientMessage(playerid, COLOR_WHITE,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
return 1;
}
if(strcmp("/regras", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
SendClientMessage(playerid, COLOR_YELLOW," Regras");
SendClientMessage(playerid, COLOR_GREEN,"Nunca faзa DB(Drive-by). Pois poderб ser kickado.");
SendClientMessage(playerid, COLOR_GREEN,"Nunca use nenhum tipo de cheater para tirar vantagem sobre os players. Pois,");
SendClientMessage(playerid, COLOR_GREEN,"poderar levar um mero kick. Mas tambйm poderб levar um ban eterno.");
SendClientMessage(playerid, COLOR_GREEN,"Nгo faзa Spawn-kill. Pois poderб ser kickado.");
SendClientMessage(playerid, COLOR_WHITE,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
return 1;
}
if(strcmp("/teleportes", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
SendClientMessage(playerid, COLOR_GREEN," Teleportes");
SendClientMessage(playerid, COLOR_YELLOW,"/jizzy || /bayside || /psf || /derby || /area51 || /zombotech");
SendClientMessage(playerid, COLOR_YELLOW,"/sanfierro || /lasventuras || /lossantos || /ammu");
SendClientMessage(playerid, COLOR_WHITE,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
return 1;
}
if(strcmp("/creditos", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_GREEN,"» ~~~~~~~~~~~~~~~~~ Crйditos ~~~~~~~~~~~~~~~~~ «");
SendClientMessage(playerid, COLOR_WHITE,"» Game Mode desenvolvido por Wendell Rocha e Hardware.");
SendClientMessage(playerid, COLOR_WHITE,"» Admin Script por: Hardware e Wendell.");
SendClientMessage(playerid, COLOR_WHITE,"» Scripter: Wendell Rocha e Hardware.");
SendClientMessage(playerid, COLOR_WHITE,"» Mapper: Wendell Rocha.");
SendClientMessage(playerid, COLOR_WHITE,"» Game Mode 4Fun. Entгo divirta-se. :D");
SendClientMessage(playerid, COLOR_GREEN,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
return 1;
}
if(strcmp("/loja", cmdtext, true, 10) == 0)
{
new aname[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid, aname, sizeof(aname));
format(string, sizeof(string), "[SERVER] O player %s estб comprando armas na loja do ammu.Pra ir no Ammu, comprar armas digite:(/ammu)", aname,playerid);
if(IsPlayerInCheckpoint(playerid)== cpcheck)
{
SendClientMessageToAll(0x80FF80AA,string);
ShowPlayerDialog(playerid,LOJA,DIALOG_STYLE_LIST,"Loja de Armas","9mm $2.000\nDesert Eagle $4.000\nShotgun $6.000\nSawn $6.500\nCombat Shotgun $7.000\nMicro SMG $8.400\nMP5 $9.000\nAK-47 $13.000\nM4 $15.000\nTec9 $8.500\nSniper Rifle $16.000","Comprar","Cancelar");
}
else
{
SendClientMessage(playerid,0xFF0000AA ,"[ERRO]Vocк nгo estб no checkpoint do Ammu Nation de Las Venturas");
}
return 1;
}
if(strcmp(cmdtext, "/afk", true) == 0)
{
if(afk[playerid] == 0)
{
afk[playerid] = 1;
new aname4[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid,aname4,sizeof(aname4));
format(string,sizeof(string),"~w~O player ~p~%s ~w~esta AFK. caso voce tambem queria ficar afk, digite /afk",aname4,playerid);
GameTextForAll(string,2200,4);
TogglePlayerControllable(playerid,0);
SendClientMessage(playerid,0xFF8080AA,"{FFFFFF}[INFO]{FF8080} » Para voltar ao normal, digite /afk novamente!");
}
else if(afk[playerid] == 1)
{
afk[playerid] = 0;
new aname6[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid,aname6,sizeof(aname6));
format(string,sizeof(string),"~w~O player ~p~%s ~w~ voltou.",aname6,playerid);
GameTextForAll(string,2200,4);
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid,0x8080FFAA,"{FFFFFF}[INFO]{FF8080} » Vocк jб estб liberado e pode se divertir novamente.");
}
return 1;
}
if(!strcmp(cmdtext, "/anims", true))
{
SendClientMessage(playerid, COLOR_YELLOW,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
SendClientMessage(playerid, COLOR_WHITE," »/bebado || /sentar || /deitar || /abaixar || /animsoff");
SendClientMessage(playerid, COLOR_YELLOW,"» ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ «");
return 1;
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//- Animaзхes:
if(strcmp("/bebado", cmdtext, true) == 0)
{
ApplyAnimation(playerid, "PED", "WALK_DRUNK", 4.0, 1, 1, 1, 1, 0);
return 1;
}
if(strcmp("/deitar", cmdtext, true) == 0)
{
ApplyAnimation(playerid, "BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
return 1;
}
if(strcmp("/abaixar", cmdtext, true) == 0)
{
ApplyAnimation(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0);
return 1;
}
if(strcmp("/sentar", cmdtext, true) == 0)
{
ApplyAnimation(playerid, "BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0);
return 1;
}
if(!strcmp(cmdtext, "/animsoff", true))
{
ClearAnimations(playerid);
return 1;
}
//- ~~~~~~~~~~~~~~~~~~~~~~~~ Teleportes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (strcmp("/jizzy", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente danзando na boate do cafetгo Jizzy. Quer ir tambйm? Use:{8080FF}(/jizzy){FFFFFF}");
SetPlayerPos(playerid,-2656.87,1410.10,910.8563);
SetPlayerInterior(playerid,3);
SendClientMessage(playerid,COLOR_WHITE,"[INFO] Vocк estб na boate do Jizzy.");
return 1;
}
if (strcmp("/derby", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente querendo se matar no Derby. Quer ir tambйm? Use:{8080FF}(/derby){FFFFFF}");
SetPlayerPos(playerid,-1881.79,936.9179,1036.44);
SetPlayerInterior(playerid,15);
SendClientMessage(playerid,COLOR_WHITE,"[INFO] Vocк estб no Derby.");
return 1;
}
if(strcmp("/bayside", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente indo passear em Bayside. Quer ir tambйm? Use:{8080FF}(/bayside){FFFFFF}");
SetPlayerPos(playerid,-2261.89,2311.94,5.51954);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO] Bom passeio. :D");
return 1;
}
if(strcmp("/psf", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente pulando de paraquedas em San Fierro. Quer ir tambйm? Use:{8080FF}(/paraquedassf){FFFFFF}");
SetPlayerPos(playerid,-1753.90,885.0483,295.9863);
GivePlayerWeapon(playerid, 46, 1);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO]Divirta-se. Mas nгo se mate :D.");
return 1;
}
if(strcmp("/zombotech", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente procurando zombi na Zombotech. Quer ir tambйm? Use:{8080FF}(/zombotech){FFFFFF}");
SetPlayerPos(playerid,-1958.92,705.8999,48.3775);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO][AVISO]Aqui nгo tem zombi. Mas vale a pena dar uma investigada aqui :D");
return 1;
}
if(strcmp("/sanfierro", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente indo passear em San Fierro. Quer ir tambйm? Use:{8080FF}(/sanfierro){FFFFFF}");
SetPlayerPos(playerid,-1951.68,294.3752,35.7250);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO]Bom passeio :D");
return 1;
}
if(strcmp("/lasventuras", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente indo passear em Las Venturas. Quer ir tambйm? Use:{8080FF}(/lasventuras){FFFFFF}");
SetPlayerPos(playerid,2196.19,1676.82,12.3671);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO]Bom passeio :D");
return 1;
}
if(strcmp("/lossantos", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente indo passear em Los Santos. Quer ir tambйm? Use:{8080FF}(/lossantos){FFFFFF}");
SetPlayerPos(playerid,2495.0720,-1687.5278,13.5150);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid, COLOR_WHITE,"[INFO]Bom passeio :D");
return 1;
}
if (strcmp("/area51", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente querendo DM na Бrea 51. Quer ir tambйm? Use:{8080FF}(/area51){FFFFFF}");
SetPlayerPos(playerid,72.4161,1917.32,17.6406);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO] Vocк estб na Бrea 51.");
return 1;
}
if(strcmp("/ammu", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(COLOR_GREEN,"[SERVER]Tem gente indo comprar armas. Quer ir tambйm? Use: {8080FF}(/ammu){FFFFFF}");
SetPlayerPos(playerid,2155.8499,944.0530,10.8203);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_WHITE,"[INFO] Vocк estб na Ammu Nation!");
return 1;
}
if(strcmp("/relatorio",cmdtext, true, 10) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
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, 0x6FDD00AA, "[x] Use: /relatorio [texto]");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (IsPlayerAdmin(i))
{
new stringre[256];
format(stringre, sizeof(stringre), "{0080FF}| RELATУRIO |{FFFFFF} Chegou um relatуrio de %s:{408080} %s{FFFFFF}", sendername, (result));
SendClientMessage(i,0xECEC00AA,stringre);
SendClientMessage(playerid, 0xFF8080AA, "[INFO] O seu relatуrio foi enviado a nossos adminstradores,obrigado !");
}
}
}
}
return 1;
}
if(strcmp("/autotuning", cmdtext, true, 10) == 0)
{
new idveiculo;
idveiculo = GetPlayerVehicleID(playerid);
if(IsPlayerAdmin(playerid) && IsPlayerInAnyVehicle(playerid))
{
AddVehicleComponent(idveiculo, 1010);
AddVehicleComponent(idveiculo, 1020);
AddVehicleComponent(idveiculo, 1080);
AddVehicleComponent(idveiculo, 1087);
AddVehicleComponent(idveiculo, 1086);
SendClientMessage(playerid, 0xFFFFFFAA,"{FF0000}[INFO]{FF0000}Veнculo tunado");
}
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SendClientMessage(playerid, COLOR_GREEN,"[INFO] Tente nгo se matar! :D");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}