gamemode

Započeo apocolcase, Mart 23, 2010, 15:54:46 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

ja sam nesto htio napraviti i kad idem da snimim(ono ko play na mp3).pokaze se neki eror(ne unutra nego svana) i neizadje iz pawna,ali kad stavim taj gamemode i pise da je nesto neispravno..ove kodove:

//---------------------------------------------------------
//
// Mafia Wars by miki
//
//---------------------------------------------------------
// Rat u vazduhu Made By miki
// Terms and Conditions of use
// 1. You will not edit this without permission
// 2. You will not claim this as yours
// 3. Do not Delete The Credits
// Thanks for downloading credits to LarzI for helping.

//---------------------------------------------------------

#include <a_samp>
static gTeam[MAX_PLAYERS];

#define Mafia tim_A 0
#define Ballas tim_B 1

#define COLOR_RED 0xFF0000FF
#define COLOR_BLUE 0x2641FEAA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA

forward SetupPlayerForClassSelection(playerid);......

//---------------------------------------------------------

main()
{
print("\n----------------------------------");
print("  Mafia Wars Made By Miki");
print("----------------------------------\n");
}

//---------------------------------------------------------

public OnGameModeInit()
{
SetGameModeText("mafia wars Script Made By miki");
UsePlayerPedAnims();

AddPlayerClass(124,1432.1437,1269.4288,10.8203,358.4917,0,0,0,0,0,0); // The mafia's 1
AddPlayerClass(127,1770.1433,-2595.4414,13.5469,0.7292,0,0,0,0,0,0); // The Mafia's 2

AddStaticVehicle(425,1417.7450,1303.9851,11.5436,97.5878,0,0); //
AddStaticVehicle(425,1447.7218,1306.2288,11.5436,280.7382,0,0); //
AddStaticVehicle(520,1434.5050,1294.4858,11.5436,181.2079,0,0); //
AddStaticVehicle(520,1451.3293,1295.9684,11.5436,184.3613,0,0); //
AddStaticVehicle(432,1425.1320,1290.5939,11.5436,181.5013,0,0); //
AddStaticVehicle(432,1418.4746,1314.5551,11.5436,92.2034,0,0); //
AddStaticVehicle(477,1449.0508,1318.0012,11.5436,272.6391,0,0); //
AddStaticVehicle(477,1448.9308,1328.5674,11.5436,273.1490,0,0); //
AddStaticVehicle(451,1422.0747,1326.6552,11.5436,94.1669,0,0); //
AddStaticVehicle(463,1448.7682,1342.3081,11.5363,273.5806,0,0); //
AddStaticVehicle(464,1422.1655,1339.9701,11.5436,82.9267,0,0); //
AddStaticVehicle(469,1436.1017,1340.2855,11.5362,5.3153,0,0); //
AddStaticVehicle(469,1745.3774,-2524.9270,14.2702,359.7657,0,0); //
AddStaticVehicle(425,1732.9368,-2527.3643,14.2702,357.2591,0,0); //
AddStaticVehicle(432,1758.4888,-2528.2092,14.2702,351.8597,0,0); //
AddStaticVehicle(469,1773.1014,-2532.1296,14.2702,352.5098,0,0); //
AddStaticVehicle(520,1789.6322,-2532.1172,14.2702,349.6897,0,0); //
AddStaticVehicle(520,1806.4460,-2535.3884,14.2702,352.8232,0,0); //
AddStaticVehicle(476,1732.5348,-2559.2161,14.2702,176.5108,0,0); //
AddStaticVehicle(476,1748.0996,-2559.6616,14.2702,182.5368,0,0); //
AddStaticVehicle(476,1763.5430,-2560.4602,14.2702,181.9101,0,0); //
AddStaticVehicle(487,1777.5554,-2562.3040,14.2702,178.4633,0,0); //
AddStaticVehicle(464,1777.5554,-2562.3040,14.2702,178.4633,0,0); //
AddStaticVehicle(464,1791.3184,-2565.4875,14.2702,177.8367,0,0); //
AddStaticVehicle(593,1807.2859,-2566.9404,14.2702,175.9567,0,0); //
return 1;
}

//---------------------------------------------------------

public SetupPlayerForClassSelection(playerid)
{
GameTextForPlayer(playerid,"~w~SA-MP: Mafia Wars);
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0);
}

//---------------------------------------------------------

public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid);
switch (classid)
{
case 0:
{
GameTextForPlayer(playerid, "Team A", 1000, 3);
SetPlayerColor(playerid,COLOR_GREY);
gTeam[playerid] = TEAM_1;
}
case 1:
{
GameTextForPlayer(playerid, "Team B", 1000, 3);
SetPlayerColor(playerid,COLOR_GREY);
gTeam[playerid] = TEAM_2;
}
}
return 1;
}

//---------------------------------------------------------


public OnPlayerSpawn(playerid)
{
   SetPlayerInterior(playerid, 0);
PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
SetPlayerArmour(playerid, 100.0);

if(gTeam[playerid] == TEAM_1)
{

SetPlayerColor(playerid,COLOR_PURPLR);Unisti neprijatelje

}

else if(gTeam[playerid] == TEAM_2)
{

SetPlayerColor(playerid,COLOR_RED);Unisti neprijatelje

}

return 1;
}
//---------------------------------------------------------

public OnPlayerDeath(playerid, killerid, reason)
{
new name[MAX_PLAYER_NAME];
new string[256];
new deathreason[20];
new playercash;
GetPlayerName(playerid, name, sizeof(name));
GetWeaponName(reason, deathreason, 20);
if (killerid == INVALID_PLAYER_ID)
{
switch (reason)
{
case WEAPON_DROWN:
{
format(string, sizeof(string), "*** %s drowned.)", name);
}
default:
{
if (strlen(deathreason) > 0)
{
format(string, sizeof(string), "*** %s died. (%s)", name, deathreason);
}
else
{
format(string, sizeof(string), "*** %s died.", name);
}
SendClientMessageToAll(COLOR_RED, string);UNISTI SVE NEPRIJATELJE
playercash = GetPlayerMoney(playerid);
if (playercash > 0)
{
GivePlayerMoney(killerid, playercash);
ResetPlayerMoney(playerid);
}
}
}
}
return 1;
}

//---------------------------------------------------------

public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,COLOR_GREEN,"Dobrodosli");
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s se pridruzio serveru.", pName);
SendClientMessageToAll(0xAAAAAAAA, string);
GameTextForPlayer(playerid,"~w~SA-MP: Mafia wars",5000,5);
return 1;
}

//---------------------------------------------------------

public OnPlayerDisconnect(playerid, reason)
{
new pName[MAX_PLAYER_NAME];
new string[56];
GetPlayerName(playerid, pName, sizeof(pName));

switch(reason)
{
case 0: format(string, sizeof(string), "%s je napustio server. (Timeout)", pName);
case 1: format(string, sizeof(string), "%s je napustio server. (Leaving)", pName);
case 2: format(string, sizeof(string), "%s je napustio server. (Kicked)", pName);
}

SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}
//---------------------------------------------------------

public OnPlayerCommandText(playerid, cmdtext[])
{
   //cmd = /v [find "car".dff] <spawn[find:// gta san andreas/models/gta3.img>
if "spawn" = Your car is spawned!
if "can't sn" = Sorry this car is unavalible!
//



if(strcmp(cmdtext, "/kill", true) == 0) return SetPlayerHealth(playerid, 0.0);
return 0;
Poslednja Izmena: Mart 23, 2010, 16:08:36 POSLE PODNE od apocolcase

kakav je error??? "Don't Send-Send" ??? Moze slika???

Ako je ovaj error onda skini drugi PAWN ili ako imas instalaciju reinstaliraj taj svoj!

Citat: free-rider poslato Mart 25, 2010, 13:55:59 POSLE PODNE
kakav je error??? "Don't Send-Send" ??? Moze slika???

Ako je ovaj error onda skini drugi PAWN ili ako imas instalaciju reinstaliraj taj svoj!

evo:


Da to ti je taj error.... Jesi probao sa drugim Pawnom.... Ako ni to ne uspije mozda si nesta promjenio u Modu , stavio beskonacnu petlju ili tako nesta.... Najbolje ako imas backup da probas sa njim, ili ako nemas uzmi bilo koji drugi GM i probaj njega compilat...  Tako ces znati jel do GMa ili do Pawna... :P

Lol, pa to je do "{" ili "}" znaci, negdje nisi dodao { ili } na kraju ili pocetku ;)
Aequam memento rebus in arduis servare mentem.

evo uspio sam.....nije do PAWN-a....ja sam pogresio