25.06.2011, 20:12
PHP код:
#include <a_samp>
#include <dini>
#include <dudb>
#pragma tabsize 0
#pragma unused ret_memcpy
#define COLOR_YELLOW 0xD8D8D8FF
#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
#define COLOR_SYSTEM 0xEFEFF7AA
#define COLOR_CYAN 0x00FFFFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_RED 0xFF0000FF
#define COLOR_ADM 0xFFFFFF00
#define REGISTRO 68
new IsLogged[MAX_PLAYERS];
new file[256];
new logged[MAX_PLAYERS];
new Level[MAX_PLAYERS];
new CVLevel[MAX_PLAYERS];
new ADALevel[MAX_PLAYERS];
new TCPLevel[MAX_PLAYERS];
new PCCLevel[MAX_PLAYERS];
new EXLevel[MAX_PLAYERS];
new BOPELevel[MAX_PLAYERS];
new CHQLevel[MAX_PLAYERS];
new RRBLevel[MAX_PLAYERS];
main()
{
}
enum pInfo
{
Admin,
Cash,
Score,
CV,
ADA,
TCP,
PCC,
EX,
BOPE,
CHQ,
RRB,
Warns,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
public OnFilterScriptInit()
{
return 1;
}
//--------------------------------------Login/Register System--------------------------------------------------------
public OnPlayerConnect(playerid)
{
IsLogged[playerid] = 0;
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), "Contas/%s.ini", name);
if (!dini_Exists(file))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Registro", "Bem-vindo, Vocк nгo й registrado porfavor insira uma senha abaixo para se registrar.", "Registrar", "Sair");
}
if(fexist(file))
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "Bem-vindo Novamente, Insira sua senha abaixo para Logar !", "Logar", "Sair");
}
if(PlayerInfo[playerid][Warns] == 5)
{
SendClientMessage(playerid, 0xFF00CC, "Your account is blocked for max. warns(5) reached, apply on forums to unblock your account.");
Kick(playerid);
}
}
public OnPlayerDisconnect(playerid, reason)
{
new name[24];
GetPlayerName(playerid,name,24);
format(file,sizeof(file),"Contas/%s.ini",name);
if(dini_Exists(file))
{
dini_IntSet(file,"Cash",GetPlayerMoney(playerid));
dini_IntSet(file,"Score",GetPlayerScore(playerid));
dini_IntSet(file,"Level",PlayerInfo[playerid][Admin]);
dini_IntSet(file,"CVLevel",PlayerInfo[playerid][CV]);
dini_IntSet(file,"ADALevel",PlayerInfo[playerid][ADA]);
dini_IntSet(file,"TCPLevel",PlayerInfo[playerid][TCP]);
dini_IntSet(file,"PCCLevel",PlayerInfo[playerid][PCC]);
dini_IntSet(file,"EXLevel",PlayerInfo[playerid][EX]);
dini_IntSet(file,"BOPELevel",PlayerInfo[playerid][BOPE]);
dini_IntSet(file,"CHQLevel",PlayerInfo[playerid][CHQ]);
dini_IntSet(file,"RRBLevel",PlayerInfo[playerid][RRB]);
dini_IntSet(file,"Warns",PlayerInfo[playerid][Warns]);
IsLogged[playerid] = 0;
return 1;
}
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
//-------------------------------Commands----------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
new giveplayer[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
new giveplayerid;
new string[256];
new tmp[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd,"/setlevel", true)==0)
{
if(PlayerInfo[playerid][Admin] >= 5) return SendClientMessage(playerid,-1,"Vocк nгo й um Admin [Level 5] para usar este comando !");
tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, -1, "ERROR: /setlevel ID lvl.");
new id; if(!IsPlayerConnected(id)) SendClientMessage(playerid, -1,"ele nao ta on aff");
tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, -1, "ERROR: /setlevel ID lvl.");
new score = strval(tmp);
PlayerInfo[playerid][Admin];
new string[0x3C*2];
format(string, sizeof(string), "aff o adm seto seu level pra %i blz? [adm id %i]", score, playerid);
SendClientMessage(id, -1, string);
return 0x01;
}
if(strcmp(cmd,"/setscore", true)==0)
{
if(PlayerInfo[playerid][Admin] >= 5) return SendClientMessage(playerid,-1,"Vocк nгo й um Admin [Level 5] para usar este comando !");
tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, -1, "ERROR: /setlevel ID lvl.");
new id; if(!IsPlayerConnected(id)) SendClientMessage(playerid, -1,"ele nao ta on aff");
tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, -1, "ERROR: /setlevel ID lvl.");
new score = strval(tmp);
SetPlayerScore(id, score);
new string[0x3C*2];
format(string, sizeof(string), "aff o adm seto seu level pra %i blz? [adm id %i]", score, playerid);
SendClientMessage(id, -1, string);
return 0x01;
}
if(strcmp(cmd, "/vehadmin", true, 10) == 0 || strcmp(cmd, "/veha", true) == 0)
{
#define Branco 0xFFFFFFFF
new tmp[500], carro, cor1 = -1, cor2 = -1, string[95], carrocriado;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){ SendClientMessage(playerid, Branco, "{1E90FF}Uso correto:{FFFFFF} /veha [CarID] [Cor1] [Cor2]"); return 1; }
carro = strval(tmp);
tmp = strtok(cmdtext, idx);
if(PlayerInfo[playerid][Admin] == 1)
if(carro < 400 || carro > 611) return SendClientMessage(playerid, Branco, "O modelo nгo pode ser maior que {1E90FF}611{FFFFFF} ou menor que {1E90FF}400");
if(!strlen(tmp)){ SendClientMessage(playerid, Branco, "{1E90FF}Uso correto:{FFFFFF} /CriarVeiculo [Modelo] [Cor1] [Cor2]"); return 1; }
cor1 = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){ SendClientMessage(playerid, Branco, "{1E90FF}Uso correto:{FFFFFF} /veha [CarID] [Cor1] [Cor2]"); return 1; }
cor2 = strval(tmp);
format(string, sizeof(string), "Vocк criou um Veiculo CarID {1E90FF}[%d] {FFFFFF}cor {1E90FF}[%d] {FFFFFF}e {1E90FF}[%d]", carro, cor1, cor2);
SendClientMessage(playerid, Branco, string);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
carrocriado = CreateVehicle(carro, X, Y, Z-1, 0.0, cor1, cor2, 25000);
PutPlayerInVehicle(playerid, carrocriado, 0);
}
if(strcmp(cmdtext, "/lchat", true) == 0)
{
if(IsLogged[playerid] == 1)
{
if(PlayerInfo[playerid][Admin] >= 1)
{
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
SendClientMessageToAll(COLOR_SYSTEM, " ");
GameTextForAll("Limpei o Chat !!", 1000,1);
new PlayerName[30];
GetPlayerName(playerid, PlayerName, 30);
printf("[Command] %s usou /lchat", PlayerName);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_CYAN, "Vocк nгo й um Admin para usar este comando !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_CYAN, "Vocк tem que estar logado para usar este comando!");
}
}
if(!strcmp(cmdtext, "/tcps", true)) {
SendClientMessage(playerid, COLOR_RED, "[ MEMBRO DO TCP ONLINE ]");
for(new i=0; i<MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) || logged[i] == 1) {
if(PlayerInfo[i][TCP] >= 1) {
new cargo[20];
if(PlayerInfo[i][TCP] == 1) cargo = "Fogueteiro";
else if(PlayerInfo[i][TCP] == 2) cargo = "Vapor";
else if(PlayerInfo[i][TCP] == 3) cargo = "Traficante";
else if(PlayerInfo[i][TCP] == 4) cargo = "Gerente";
else if(PlayerInfo[i][TCP] == 5) cargo = "Dono do Morro";
new str[256],pname[24]; GetPlayerName(i, pname, 24);
format(str, 128, "%s %s",cargo, pname);
SendClientMessage(playerid, COLOR_CYAN, str);
}
}
return 0x01;
}
return 0x01;
}
public OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][CV] >= 1)
{
// CV
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2660.4978,881.9752,79.7738);
GameTextForPlayer(playerid,"~r~COMPLEXO DO ALMEAO", 1000,1);
GivePlayerWeapon(playerid,29,999999);
GivePlayerWeapon(playerid,27,999999);
GivePlayerWeapon(playerid,41,999999);
GivePlayerWeapon(playerid,24,999999);
GivePlayerWeapon(playerid,4,999999);
GivePlayerWeapon(playerid,34,999999);
GivePlayerWeapon(playerid,30,999999);
SetPlayerArmour(playerid, 100.0);
SetPlayerColor(playerid, 0xFF0000FF);
SetPlayerSkin(playerid, 107);
SetPlayerHealth(playerid, 100.0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid, COLOR_WHITE, "Use /comandoscv, para ver os comandos de sua Facзгo !");
SendClientMessage(playerid, COLOR_RED, "Quem comanda й o comando, e o comando e VERMELHO !");
TogglePlayerControllable(playerid,1);
}
if(PlayerInfo[playerid][ADA] >= 1)
{
// ADA
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2548.8665,-465.9125,69.1830);
GameTextForPlayer(playerid,"~y~ROCINHA", 1000,1);
GivePlayerWeapon(playerid,29,999999);
GivePlayerWeapon(playerid,27,999999);
GivePlayerWeapon(playerid,41,999999);
GivePlayerWeapon(playerid,24,999999);
GivePlayerWeapon(playerid,4,999999);
GivePlayerWeapon(playerid,34,999999);
GivePlayerWeapon(playerid,30,999999);
SetPlayerArmour(playerid, 100.0);
SetPlayerColor(playerid, COLOR_YELLOW);
SetPlayerSkin(playerid, 14);
SetPlayerHealth(playerid, 100.0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid, COLOR_WHITE, "Use /comandosada, para ver os comandos de sua Facзгo !");
SendClientMessage(playerid, COLOR_YELLOW, "Somos Amigos dos Amigos, sem cumpri vacilaзгo !");
TogglePlayerControllable(playerid,1);
}
if(PlayerInfo[playerid][TCP] >= 1)
{
// TCP
SendClientMessage(playerid, COLOR_WHITE, "Use /comandostcp, para ver os comandos de sua Facзгo !");
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2452.8435,1188.5889,35.1641);
GameTextForPlayer(playerid,"~b~ACARI", 1000,1);
GivePlayerWeapon(playerid,29,999999);
GivePlayerWeapon(playerid,27,999999);
GivePlayerWeapon(playerid,41,999999);
GivePlayerWeapon(playerid,24,999999);
GivePlayerWeapon(playerid,4,999999);
GivePlayerWeapon(playerid,34,999999);
GivePlayerWeapon(playerid,30,999999);
SetPlayerArmour(playerid, 100.0);
SetPlayerColor(playerid, 0x0078F6AA);
SetPlayerSkin(playerid, 29);
SetPlayerHealth(playerid, 100.0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid, 0x0078F6AA, "Terceiro Comando Puro, fala que й nуis !");
TogglePlayerControllable(playerid,1);
}
if(PlayerInfo[playerid][PCC] >= 1)
{
// PCC
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2315.3228,109.8254,35.3125);
GameTextForPlayer(playerid,"~r~COMPLEXO DO ALMEAO", 1000,1);
GivePlayerWeapon(playerid,29,999999);
GivePlayerWeapon(playerid,27,999999);
GivePlayerWeapon(playerid,41,999999);
GivePlayerWeapon(playerid,24,999999);
GivePlayerWeapon(playerid,4,999999);
GivePlayerWeapon(playerid,34,999999);
GivePlayerWeapon(playerid,30,999999);
SetPlayerArmour(playerid, 100.0);
SetPlayerColor(playerid, 0xA81B00AA);
SetPlayerSkin(playerid, 200);
SetPlayerHealth(playerid, 100.0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid, COLOR_WHITE, "Use /comandospcc, para ver os comandos de sua Facзгo !");
SendClientMessage(playerid, 0xA81B00AA, "Quem manda ? Quem manda ? Quem manda, й o PCC !");
TogglePlayerControllable(playerid,1);
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if( GetVehicleModel(vehicleid) == 470 && !PlayerInfo[playerid][EX] == 1 ) //PATRIOT
{
new Float:pP[ 3 ];
GetPlayerPos(playerid, pP[ 0 ], pP[ 1 ], pP[ 2 ]);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
return SetPlayerPos(playerid, pP[ 0 ], pP[ 1 ]+1, pP[ 2 ]),
SendClientMessage(playerid, COLOR_RED, "Vocк nгo pode pegar um veiculo do EXERCITO!" );
}
if( GetVehicleModel(vehicleid) == 425 && !PlayerInfo[playerid][EX] == 1 ) // HUNTER
{
new Float:pP[ 3 ];
GetPlayerPos(playerid, pP[ 0 ], pP[ 1 ], pP[ 2 ]);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
return SetPlayerPos(playerid, pP[ 0 ], pP[ 1 ]+1, pP[ 2 ]),
SendClientMessage(playerid, COLOR_RED, "Vocк nгo pode pegar um veiculo do EXERCITO!" );
}
if( GetVehicleModel(vehicleid) == 433 && !PlayerInfo[playerid][EX] == 1 ) // BARRACKS
{
new Float:pP[ 3 ];
GetPlayerPos(playerid, pP[ 0 ], pP[ 1 ], pP[ 2 ]);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
return SetPlayerPos(playerid, pP[ 0 ], pP[ 1 ]+1, pP[ 2 ]),
SendClientMessage(playerid, COLOR_RED, "Vocк nгo pode pegar um veiculo do EXERCITO!" );
}
if( GetVehicleModel(vehicleid) == 427 && !PlayerInfo[playerid][BOPE] == 1 ) // CAVEIRAO BOPE
{
new Float:pP[ 3 ];
GetPlayerPos(playerid, pP[ 0 ], pP[ 1 ], pP[ 2 ]);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
return SetPlayerPos(playerid, pP[ 0 ], pP[ 1 ]+1, pP[ 2 ]),
SendClientMessage(playerid, COLOR_RED, "Vocк nгo pode pegar um veiculo da BOPE!" );
}
if( GetVehicleModel(vehicleid) == 497 && !PlayerInfo[playerid][BOPE] == 1 ) // CAVEIRAO BOPE
{
new Float:pP[ 3 ];
GetPlayerPos(playerid, pP[ 0 ], pP[ 1 ], pP[ 2 ]);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
return SetPlayerPos(playerid, pP[ 0 ], pP[ 1 ]+1, pP[ 2 ]),
SendClientMessage(playerid, COLOR_RED, "Vocк nгo pode pegar um veiculo da BOPE!" );
}
if( GetVehicleModel(vehicleid) == 490 && !PlayerInfo[playerid][BOPE] == 1 ) // BLAZER BOPE
{
new Float:pP[ 3 ];
GetPlayerPos(playerid, pP[ 0 ], pP[ 1 ], pP[ 2 ]);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
return SetPlayerPos(playerid, pP[ 0 ], pP[ 1 ]+1, pP[ 2 ]),
SendClientMessage(playerid, COLOR_RED, "Vocк nгo pode pegar um veiculo da BOPE!" );
}
if( GetVehicleModel(vehicleid) == 498 && PlayerInfo[playerid][CHQ] == 1 ) // BLAZER CHOQUE
{
new Float:pP[ 3 ];
GetPlayerPos(playerid, pP[ 0 ], pP[ 1 ], pP[ 2 ]);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
return SetPlayerPos(playerid, pP[ 0 ], pP[ 1 ]+1, pP[ 2 ]),
SendClientMessage(playerid, COLOR_RED, "Vocк nгo pode pegar um veiculo da TROPA DE CHOQUE!" );
}
if( GetVehicleModel(vehicleid) == 523 && !PlayerInfo[playerid][CHQ] == 1 ) // CARRO PM
{
new Float:pP[ 3 ];
GetPlayerPos(playerid, pP[ 0 ], pP[ 1 ], pP[ 2 ]);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
return SetPlayerPos(playerid, pP[ 0 ], pP[ 1 ]+1, pP[ 2 ]),
SendClientMessage(playerid, COLOR_RED, "Vocк nгo pode pegar um veiculo da TROPA DE CHOQUE!" );
}
if( GetVehicleModel(vehicleid) == 432 && !PlayerInfo[playerid][EX] == 1 ) // TANK
{
new Float:pP[ 3 ];
GetPlayerPos(playerid, pP[ 0 ], pP[ 1 ], pP[ 2 ]);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
return SetPlayerPos(playerid, pP[ 0 ], pP[ 1 ]+1, pP[ 2 ]),
SendClientMessage(playerid, COLOR_RED, "Vocк nгo pode pegar um veiculo do EXERCITO!" );
}
if( GetVehicleModel(vehicleid) == 488 && !PlayerInfo[playerid][RRB] == 1 ) // HELI RRB
{
new Float:pP[ 3 ];
GetPlayerPos(playerid, pP[ 0 ], pP[ 1 ], pP[ 2 ]);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
return SetPlayerPos(playerid, pP[ 0 ], pP[ 1 ]+1, pP[ 2 ]),
SendClientMessage(playerid, COLOR_RED, "Vocк nгo pode pegar um veiculo de um REPУRTER!" );
}
if( GetVehicleModel(vehicleid) == 582 && !PlayerInfo[playerid][RRB] == 1 ) // CARRO RRB
{
new Float:pP[ 3 ];
GetPlayerPos(playerid, pP[ 0 ], pP[ 1 ], pP[ 2 ]);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
return SetPlayerPos(playerid, pP[ 0 ], pP[ 1 ]+1, pP[ 2 ]),
SendClientMessage(playerid, COLOR_RED, "Vocк nгo pode pegar um veiculo de um REPУRTER!" );
}
return true;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == 1)
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), "Contas/%s.ini", name);
if(!response) return Kick(playerid);
if(!strlen(inputtext)) return
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Registro", "Bem-vindo, Vocк nгo й Registrado, Porfavor insira uma senha abaixo para se registrar.", "Registrar", "Sair");
dini_Create(file);
dini_IntSet(file, "Password", udb_hash(inputtext));
dini_IntSet(file, "Level",PlayerInfo[playerid][Admin] = 0);
dini_IntSet(file, "Cash",PlayerInfo[playerid][Cash] = 500);
dini_IntSet(file, "Score",PlayerInfo[playerid][Score] = 0);
dini_IntSet(file, "CVLevel",PlayerInfo[playerid][CV] = 0);
dini_IntSet(file, "ADALevel",PlayerInfo[playerid][ADA] = 0);
dini_IntSet(file, "TCPLevel",PlayerInfo[playerid][TCP] = 0);
dini_IntSet(file, "PCCLevel",PlayerInfo[playerid][PCC] = 0);
dini_IntSet(file, "EXLevel",PlayerInfo[playerid][EX] = 0);
dini_IntSet(file, "BOPELevel",PlayerInfo[playerid][BOPE] = 0);
dini_IntSet(file, "CHQLevel",PlayerInfo[playerid][CHQ] = 0);
dini_IntSet(file, "RRBLevel",PlayerInfo[playerid][RRB] = 0);
dini_IntSet(file, "Warns",PlayerInfo[playerid][Warns] = 0);
format(string, 128, "[RTX]INFROMA: Parabйns vocк se registrou com o Nick %s e com a Senha %s, Guarde bem estб senha !", name, inputtext);
SendClientMessage(playerid, 0xFF00CC, string);
IsLogged[playerid] = 1;
}
if (dialogid == 2)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), "Contas/%s.ini", name);
if(!response) return Kick(playerid);
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "Bem-vindo Novamente, Insira sua senha abaixo para Logar !", "Logar", "Sair");
new tmp;
tmp = dini_Int(file, "Password");
if(udb_hash(inputtext) != tmp) {
SendClientMessage(playerid, 0xFF0000FF, "Senha Incorreta !");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "Bem-vindo Novamente, Insira sua senha abaixo para Logar !", "Logar", "Sair", name);
}
else
{
IsLogged[playerid] = 1;
SetPlayerMoney(playerid, dini_Int(file, "Cash"));
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerColor(playerid, dini_Int(file, "Color"));
PlayerInfo[playerid][Warns] = dini_Int(file, "Warns");
PlayerInfo[playerid][CV] = dini_Int(file, "CVLevel");
PlayerInfo[playerid][ADA] = dini_Int(file, "ADALevel");
PlayerInfo[playerid][TCP] = dini_Int(file, "TCPLevel");
PlayerInfo[playerid][PCC] = dini_Int(file, "PCCLevel");
PlayerInfo[playerid][EX] = dini_Int(file, "EXLevel");
PlayerInfo[playerid][BOPE] = dini_Int(file, "BOPELevel");
PlayerInfo[playerid][CHQ] = dini_Int(file, "CHQLevel");
PlayerInfo[playerid][RRB] = dini_Int(file, "RRBLevel");
PlayerInfo[playerid][Admin] = dini_Int(file, "Level");
SendClientMessage(playerid,0xFF00CC, "[RTX]INFORMA: Logado com Sucesso !!");
}
if(dialogid == REGISTRO)
{
if(response)
{
if(listitem == 0)
{
PlayerInfo[playerid][CV] = 1; // Irб setar o cv de level 1
}
if(listitem == 1)
{
PlayerInfo[playerid][TCP] = 1; // Irб setar o ada de level 1
}
if(listitem == 2)
{
PlayerInfo[playerid][ADA] = 1; // Irб setar o tcp de level 1
}
if(listitem == 3)
{
PlayerInfo[playerid][PCC] = 1; // Irб setar o pcc de level 1
}
}
}
return 1;
}
return 0;
}
PHP код:
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(129) : warning 215: expression has no effect
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(130) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(143) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(152) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(152) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(312) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(312) : error 004: function "OnPlayerSpawn" is not implemented
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(408) : warning 225: unreachable code
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(408) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(408) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(410) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(414) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(416) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(420) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(424) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(426) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(430) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(434) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(436) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(440) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(444) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(446) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(450) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(454) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(456) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(460) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(464) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(466) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(470) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(474) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(476) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(480) : error 017: undefined symbol "vehicleid"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
26 Errors.