07.05.2013, 18:14
O
Meu gamemode completo.... :
A linha do erro comeзao em
PHP код:
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(64) : error 010: invalid function or declaration
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(66) : error 010: invalid function or declaration
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(69) : error 021: symbol already defined: "GetPlayerName"
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(72) : error 010: invalid function or declaration
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(75) : error 010: invalid function or declaration
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(77) : error 010: invalid function or declaration
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(79) : error 010: invalid function or declaration
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(80) : error 010: invalid function or declaration
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(81) : error 010: invalid function or declaration
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(84) : error 010: invalid function or declaration
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(85) : error 021: symbol already defined: "SendClientMessage"
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(87) : error 010: invalid function or declaration
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(87 -- 89) : error 010: invalid function or declaration
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(87 -- 90) : error 010: invalid function or declaration
C:\Users\Bruno\Desktop\Meu GameMode\gamemodes\RP-SD.pwn(87 -- 90) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
15 Errors.
PHP код:
//-------------------------------------------------ROLE PLAY BY DaYviSoN---------------------------------------------//
#include <a_samp>
#if defined FILTERSCRIPT
#else
//Tela que aparece no samp-server. (Quando se liga o servidor)
main()
{
print(" ");
print("_______________________________________________________________");
print("Estado do Servidor: ");
print("O Servidor foi ligado com sucesso! Estб Pronto a ser Utilizado.");
print("_______________________________________________________________");
print(" ");
}
#endif
public OnGameModeInit()
{
// Modo de Jogo
SetGameModeText("RolePlay v1.0");
//Player
AddPlayerClass(0, -767.3870,1499.8663,24.7051, 269.1425, 0, 0, 0, 0, 0, 0);
// Veiculos
AddStaticVehicle(431,-774.5818,1444.2756,13.8953,77.9480,47,74);
AddStaticVehicle(431,-774.1534,1428.5939,13.8890,102.9080,47,74);
AddStaticVehicle(574,-791.8569,1445.9147,13.5142,78.0698,26,26);
AddStaticVehicle(574,-791.9972,1427.2260,13.5142,104.1815,26,26);
AddStaticVehicle(574,-806.3814,1446.4915,13.5142,76.4160,26,26);
AddStaticVehicle(574,-806.3204,1427.0098,13.5142,103.9668,26,26);
AddStaticVehicle(599,-221.1601,1005.3596,19.8951,180.0661,0,1);
AddStaticVehicle(525,-216.7263,1005.1966,19.6012,182.4167,52,54);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/comandos", true))
{
SendClientMessage(playerid, 0xFFFFFFFF, "--------------------------------Comandos--------------------------");
SendClientMessage(playerid, 0xFFFFFFFF, " ");
SendClientMessage(playerid, 0xFFFFFFFF, "--------------------------------Comandos--------------------------");
return 1;
// Returning 1 informs the server that the command has been processed.
// OnPlayerCommandText won't be called in other scripts.
}
return 0;
// Returning 0 informs the server that the command hasn't been processed by this script.
// OnPlayerCommandText will be called in other scripts until one returns 1.
// If no scripts return 1, the 'SERVER: Unknown Command' message will be shown.
}
if(strcmp(cmdtext, "/comprarcarro", true) == 0) {
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
new pname[MAX_PLAYER_NAME];
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, sizeof(aname));
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), PASTA_CONTAS, aname);
for(new carro = 0; carro < MAX_CARROS; carro++)
{
format(string, sizeof(string), "carro%d.ini", carro);
if(strcmp(dini_Get(string, "Dono"), pname, true) == 0){
SendClientMessage(playerid, Vermelho, "Vocк jб tem um carro");
return 1;
}
if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid) == 0 && VehicleID == dini_Int(string, "Id")){
if(dini_Int(string,"TDono") == 1) return SendClientMessage(playerid, Vermelho,"Esse Carro jб tem dono!");
if(GetPlayerGrana(playerid) >= dini_Int(string, "Preco")){
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
dini_IntSet(string, "TDono", 1);
dini_Set(string, "Dono", aname);
SendClientMessage(playerid, Violeta, "(INFO) Veiculo comprado com sucesso!");
SendClientMessage(playerid, Vermelho, "(INFO) Para ver os comandos do veiculo, use: /meucarro");
GivePlayerGrana(playerid, -dini_Int(string, "Preco"));
TogglePlayerControllable(playerid, 3);
return 1;
} else {
SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo tem dinheiro suficiente!");
return 1;
}
}
}
}
public OnPlayerConnect(playerid)
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s entrou no servidor!",pName);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new
string[64],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
switch(reason)
{
case 0: format(string,sizeof string,"%s saiu do servidor. (Problema de Conexгo)",name);
case 1: format(string,sizeof string,"%s saiu do servidor. (Saiu)",name);
case 2: format(string,sizeof string,"%s saiu do servidor. (Kick/Ban)",name);
}
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
PHP код:
if(strcmp(cmdtext, "/comprarcarro", true) == 0) {