31.01.2011, 02:35
Eu tentei fazer um GameMode de DM do 0 seguindo o tutorial do cronosbr...
Sу que coloquei coisas a mais.
Os seguintes erros sгo:
O GameMode estб aн:
Me ajudem por favor
Sу que coloquei coisas a mais.
Os seguintes erros sгo:
pawn Код:
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(28) : warning 217: loose indentation
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(51) : warning 217: loose indentation
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(65) : warning 217: loose indentation
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(72) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(72) : warning 215: expression has no effect
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(72) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(79) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(79) : warning 215: expression has no effect
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(79) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(86) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(86) : warning 215: expression has no effect
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(86) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(93) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(93) : warning 215: expression has no effect
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(93) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(100) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(100) : warning 215: expression has no effect
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(100) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(107) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(107) : warning 215: expression has no effect
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(107) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(112) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(112) : error 004: function "OnPlayerConnect" is not implemented
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(117) : warning 225: unreachable code
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(117) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(117) : error 004: function "OnPlayerDisconnect" is not implemented
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(122) : warning 225: unreachable code
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(122) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(122) : error 004: function "OnPlayerSpawn" is not implemented
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(127) : warning 225: unreachable code
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(127) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(127) : error 004: function "OnPlayerDeath" is not implemented
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(130) : error 017: undefined symbol "killerid"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(131) : error 017: undefined symbol "reason"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(135) : error 017: undefined symbol "killerid"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(136) : error 017: undefined symbol "killerid"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(137) : error 017: undefined symbol "killerid"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(138) : error 017: undefined symbol "killerid"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
26 Errors.
O GameMode estб aн:
pawn Код:
#include <a_samp>
#define GROVE 1
#define BALLAS 2
#define LOSAZTECAS 3
#define LOSVAGOS 4
#define NANGBOYS 5
#define RUSSOS 6
new Gang[MAX_PLAYERS];
new Kills[MAX_PLAYERS];
new Mortes[MAX_PLAYERS];
new TK[MAX_PLAYERS];
main()
{
print("\n----------------------------------");
print(" Gaming of Life Gang War. Carregado!");
print("----------------------------------\n");
}
//---------------------------------------------------------------------------------
public OnGameModeInit()
{
SetGameModeText("Blank Script");
//GROVE
AddPlayerClass(105, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //grove
AddPlayerClass(106, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //grove
AddPlayerClass(107, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //grove
//BALLAS
AddPlayerClass(102, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //ballas
AddPlayerClass(103, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //ballas
AddPlayerClass(104, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //ballas
//LOS AZTECAS
AddPlayerClass(114, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //losaztecas
AddPlayerClass(115, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //losaztecas
AddPlayerClass(116, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //losaztecas
//LOS VAGOS
AddPlayerClass(108, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //losvagos
AddPlayerClass(109, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //losvagos
AddPlayerClass(110, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //losvagos
//NANG BOYS
AddPlayerClass(121, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //nangboys
AddPlayerClass(122, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //nangboys
AddPlayerClass(123, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //nangboys
//RUSSOS
AddPlayerClass(111, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //russos
AddPlayerClass(112, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //russos
AddPlayerClass(113, 1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1); //russos
return 1;
}
public OnGameModeExit()
{
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);
if(classid == 0)
{
Gang[playerid] = GROVE;
GameTextForPlayer(playerid,"Grove Street",6000,6);
}
else if(classid == 1)
{
else if(classid == 2)
{
Gang[playerid] = BALLAS;
GameTextForPlayer(playerid,"Ballas",6000,6);
}
else if(classid == 1)
{
else if(classid == 2)
{
Gang[playerid] = LOSAZTECAS;
GameTextForPlayer(playerid,"Los Aztecas",6000,6);
}
else if(classid == 1)
{
else if(classid == 2)
{
Gang[playerid] = LOSVAGOS;
GameTextForPlayer(playerid,"Los Vagos",6000,6);
}
else if(classid == 1)
{
else if(classid == 2)
{
Gang[playerid] = NANGBOYS;
GameTextForPlayer(playerid,"Nang Boys",6000,6);
}
else if(classid == 1)
{
else if(classid == 2)
{
Gang[playerid] = RUSSOS;
GameTextForPlayer(playerid,"Russos",6000,6);
}
else if(classid == 1)
{
else if(classid == 2)
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
Mortes[playerid]++;
if(killerid == INVALID_PLAYER_ID) {
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
}
else if(Gang[playerid] == Gang[playerid])
{
SendClientMessage(killerid, 0xFF0000AA, "Nгo mate pessoas da mesma time que vocк!");
SetPlayerScore(killerid,GetPlayerScore(killerid) -1);
GivePlayerMoney(killerid, -5000);
TK[killerid]++;
Mortes[playerid]++;
}
else if(Gang[playerid] != Gang[playerid])
{
SetPlayerScore(killerid,GetPlayerScore(killerid) +1);
GivePlayerMoney(killerid, 10000);
Kills[killerid]++;
Mortes[playerid]++;
}
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("/status", cmdtext, true, 10) == 0)
{
new stringkills[256];
new stringmortes[256];
new stringtk[256];
SendClientMessage(playerid,0xFF9933AA,"Seus status:");
format(stringkills,sizeof(stringkills),"Kills: %d", Kills[playerid]);
SendClientMessage(playerid,0xFF9933AA, stringkills);
format(stringmortes,sizeof(stringmortes),"Mortes: %d", Mortes[playerid]);
SendClientMessage(playerid, 0xFF9933AA, stringmortes);
format(stringtk,sizeof(stringtk),"Team Kills: %d", TK[playerid]);
SendClientMessage(playerid, 0xFF9933AA, stringtk);
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
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)
{
if(Gang[playerid] == GROVE)
{
SetPlayerColor(playerid, 0x33AA33AA);
}
else if(Gang[playerid] == BALLAS)
{
SetPlayerColor(playerid, 0x9900FFAA);
}
if(Gang[playerid] == LOSAZTECAS)
{
SetPlayerColor(playerid, 0x0000BBAA);
}
if(Gang[playerid] == LOSVAGOS)
{
SetPlayerColor(playerid, 0xFFFF00AA);
}
if(Gang[playerid] == NANGBOYS)
{
SetPlayerColor(playerid, 0xFF8080FF);
}
if(Gang[playerid] == RUSSOS)
{
SetPlayerColor(playerid, 0XA52A2AAA);
}
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)
{
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;
}
![sad](images/smilies/sad.gif)