15.12.2010, 20:00
Код:
Jo Ricardo. Please post your errors. Without it, I / we can't help you!
Код:
C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(118) : error 055: start of function body without function header C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(120) : error 010: invalid function or declaration C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(181) : error 055: start of function body without function header C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(182) : error 010: invalid function or declaration C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(183) : error 010: invalid function or declaration C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(184) : error 010: invalid function or declaration C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(191) : warning 217: loose indentation C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(194) : warning 217: loose indentation C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(254) : error 055: start of function body without function header C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(256) : error 010: invalid function or declaration C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(263) : warning 217: loose indentation C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(273) : warning 217: loose indentation C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(356) : warning 217: loose indentation C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(413) : warning 203: symbol is never used: "dcmd_engine" C:\Users\Ricardo\Desktop\Meu GM\MeuGm\gamemodes\RR-RP.pwn(413) : warning 203: symbol is never used: "dcmd_exitveh" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.
pawn Код:
#include <a_samp>
#include <file>
#include <a_samp>
#include <mapicon>
#include <newf>
#include <dcmd>
#include <cpstream>
#include <md5>
#include <streamer>
#pragma dynamic 145000
#define FILTERSCRIPT
//-----------------------------------------------------------------
main()
{
print("\n----------------------------------");
print(" RR-RP by Ricardo_Rodrigues");
print("----------------------------------\n");
}
//-----------------------------------------------------------------
#define MAX_SLOTS 30
#define OWNER_NAME "Ricardo_Rodrigues
#define DEFINE_NAME INT"
#define SendMessage(%0, %1, %2)
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
//---------------[COLORS/TEAMS]------------------------------------------
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_SYSTEM 0xFFA500AA
#define COLOR_SUSPECT 0xFF8000AA
#define COLOR_NEWS 0x0259EAAA
#define COLOR_DARKRED 0x8B0000AA
#define COLOR_RED 0xFF0000AA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_PINK 0xDC00DDAA
#define COLOR_BLUE 0x0259EAAA
#define COLOR_GREEN 0x00A800AA
#define COLOR_ORANGE 0xFF8000AA
#define COLOR_CYAN 0xFF8080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_DARKBLUE 0x0000A0AA
#define COLOR_BLACK 0x000000AA
#define COLOR_DARKGOLD 0x808000AA
#define COLOR_PURPLE 0xFF00FFAA
#define COLOR_BROWN 0x804000AA
#define TEAMCOLOR_NONE 0xAFAFAFAA
#define TEAMCOLOR_GROVE 0x00A800AA
#define TEAMCOLOR_BALLAS 0xFF00FFAA
#define TEAMCOLOR_AZTECAS 0x33CCFFAA
#define TEAMCOLOR_VAGOS 0xFFFF00AA
#define TEAMCOLOR_RIFA 0x33CCFFAA
#define TEAMCOLOR_BIKER 0xFF0080AA
#define TEAMCOLOR_FIREMAN 0xB22222AA
#define TEAMCOLOR_MEDIC 0x87CEEBAA
#define TEAMCOLOR_COP 0x0259EAAA
#define TEAMCOLOR_NORMAL 0xFFFFFFAA
#define TEAMCOLOR_ARMY 0x556B2FAA
#define TEAMCOLOR_NEWS 0x3CB371AA
#define TEAM_NONE 0
#define TEAM_GROVE 1
#define TEAM_BALLAS 2
#define TEAM_AZTECAS 3
#define TEAM_VAGOS 4
#define TEAM_RIFA 5
#define TEAM_BIKER 6
#define TEAM_MEDIC 7
#define TEAM_FIREMAN 8
#define TEAM_COP 9
#define TEAM_NORMAL 10
#define TEAM_ARMY 11
#define TEAM_NEWS 12
//---------------[COLORS FROM SEIFADMIN]---------------------------
#define GREEN 0x21DD00FF
#define RED 0xE60000FF
#define ADMIN_RED 0xFB0000FF
#define YELLOW 0xFFFF00FF
#define ORANGE 0xF97804FF
#define LIGHTRED 0xFF8080FF
#define LIGHTBLUE 0x00C2ECFF
#define PURPLE 0xB360FDFF
#define BLUE 0x1229FAFF
#define LIGHTGREEN 0x38FF06FF
#define DARKPINK 0xE100E1FF
#define DARKGREEN 0x008040FF
#define AQUAGREEN 0x00CACAFB
#define NICESKY 0x99FFFFAA
#define GREY 0xCECECEFF
#define WHITE 0xFFFFFFFF
#define blue 0x375FFFFF
#define red 0xFF0000AA
#define green 0x33FF33AA
#define yellow 0xFFFF00AA
#define grey 0xC0C0C0AA
#define blue1 0x2641FEAA
#define lightblue 0x33CCFFAA
#define orange 0xFF9900AA
#define black 0x2C2727AA
#define COLOR_BLACK 0x000000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN1 0x33AA33AA
new Engine[MAX_VEHICLES];
forward EngineTimer(playerid);
public OnGameModeInit()
{
SetGameModeText("RR-RP");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
//------------------------[EGINE SYSTEM THINKS]-------------------------------
{
print("Engine System loaded.");
return 1;
}
//---------------------------------------------------------------------------
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has joined the server. Welcome!",pName);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid,2229.348388,-1159.111653,25.806554);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
SendClientMessageToAll(0xFFFF00AA, str);
return 1;
}
return 0;
}
//---------------------------[ENGINE THINKS]-------------------------------------
{
dcmd(exitveh, 7, cmdtext);
dcmd(engine, 6, cmdtext);
return 0;
}
public EngineTimer(playerid)
{
new rand = random(2);
if(rand == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "Engine Started...");
SendClientMessage(playerid, COLOR_YELLOW, "To turn off the vehicle, Type (/engine)");
new vehicleid = GetPlayerVehicleID(playerid);
Engine[vehicleid] = 1;
TogglePlayerControllable(playerid, 1);
}
if(rand == 1)
{
SendClientMessage(playerid, COLOR_GREEN, "Engine Failed...");
SendClientMessage(playerid, COLOR_YELLOW, "Try Again");
}
}
dcmd_engine(playerid, params[])
{
#pragma unused params
new vehicleid = GetPlayerVehicleID(playerid);
if(Engine[vehicleid] == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "Engine Starting...");
SetTimerEx("EngineTimer", 2000, 0, "i", playerid);
}
else if(Engine[vehicleid] == 1)
{
Engine[vehicleid] = 0;
SendClientMessage(playerid, COLOR_RED, "Engine Stopped...");
SendClientMessage(playerid, COLOR_YELLOW, "To exit the vehicle press (F Key) Or (Enter)");
SendClientMessage(playerid, COLOR_YELLOW, "Press (Shift) or Type (/engine) to start the vehicles engine");
TogglePlayerControllable(playerid,0);
}
return 1;
}
dcmd_exitveh(playerid, params[])
{
#pragma unused params
if(IsPlayerInAnyVehicle(playerid))
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle");
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SendClientMessage(playerid, 0x1229FAFF, " [RR-RP]You are entering a State car! Drive careful!");
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
SendClientMessage(playerid, 0x1229FAFF, "[RR-RP]You Leaved the car, DON'T Forget to park it rigth!");
return 1;
}
{
TogglePlayerControllable(playerid,1);
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(Engine[vehicleid] == 0)
{
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_YELLOW, "Press (Shift) or Type (/engine) to start the vehicles engine");
}
else if(Engine[vehicleid] == 1)
{
SendClientMessage(playerid, COLOR_GREEN, "Engine Running...");
}
}
return 1;
}
//----------------------------------------------------------------------------------------------------------
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
//--------------------------------[VEHICLE ENGINE THINKS]-----------------------------------------------
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
if(Engine[vehicleid] == 0)
{
if(newkeys & KEY_SECONDARY_ATTACK)
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
}
else if(newkeys & KEY_JUMP)
{
SendClientMessage(playerid, COLOR_GREEN, "Engine Starting...");
SetTimerEx("EngineTimer", 2000, 0, "i", playerid);
}
}
}
return 1;
}
//-----------------------------------------------------------------------------------------------------
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}