Úgylátszik mégmindig nem érted..
Nem gangzone-val akarom ezt,hanem kocsival..
szal van az egyik csapatnak egy kocsija,amit a másik csapatnak pl. 10percen belül elkell lopnia,és elvinnie egy checkpoint-ba (ami leggyakoribban a saját térfelén szokott lenni).
Ha nem sikerül a támadó csapatnak ellopnia a kocsit 10 percen belül,akk a védok nyertek.
És nálam most már csak az a baj h akárhogyis rakom be a premier-t:
new premier;
premier = (426,blablabla..)
figy,inkább bemásolom a modot:
#include <a_samp>
#include <core>
#include <float>
static gTeam[MAX_PLAYERS];
new gObjectiveAirPlayer;
#define TEAM_ATTACK 1
#define TEAM_DEFEND 2
#define TEAM_ATTACK_COLOR 0xFF0000AA
#define TEAM_DEFEND_COLOR 0x1E90FFAA
new player[MAX_PLAYER_NAME];
new str[128];
new premier;
forward SetPlayerToTeamColor(playerid);
forward SetupPlayerForClassSelection(playerid);
forward SetPlayerTeamFromClass(playerid,classid);
forward BlueWin();
forward GreenWin();
forward ExitTheGameMode();
//---------------------------------------------------------
main()
{
print(\"\\n--------------------------\");
print(\"The Premier Mode By Volum3\");
print(\"MAP: The Premier, By: Volum3\");
print(\"--------------------------\\n\");
}
//---------------------------------------------------------
public OnGameModeInit()
{
SetGameModeText(\"The Premier\");
SetTimer(\"BlueWin\",300000,0);
UsePlayerPedAnims();
ShowPlayerMarkers(1);
ShowNameTags(1);
SetWorldTime(19);
// ATTACK
AddPlayerClass(108,495.349,-1534.515,20.234,90.0,4,1,24,500,30,200);
AddPlayerClass(110,495.349,-1534.515,20.234,90.0,4,1,24,500,30,200);
// DEFEND
AddPlayerClass(114,668.257,-1558.865,19.027,180.0,4,1,24,500,30,200);
AddPlayerClass(115,668.257,-1558.865,19.027,180.0,4,1,24,500,30,200);
AddPlayerClass(116,668.257,-1558.865,19.027,180.0,4,1,24,500,30,200);
// PREMIER
premier = CreateVehicle(426,695.056,-1571.168,14.298,270.0,6,6,10000);
// ATTACK VEHICLES
CreateVehicle(581,488.082,-1545.200,17.626,180.0,6,6,120000);
CreateVehicle(581,490.916,-1543.909,17.608,180.0,6,6,120000);
CreateVehicle(581,493.801,-1542.721,17.590,180.0,6,6,120000);
CreateVehicle(581,486.772,-1539.098,18.134,180.0,6,6,120000);
CreateVehicle(581,490.306,-1538.055,18.103,180.0,6,6,120000);
CreateVehicle(581,493.249,-1536.723,18.107,180.0,6,6,120000);
CreateVehicle(581,490.124,-1533.652,18.482,180.0,6,6,120000);
CreateVehicle(581,487.345,-1534.772,18.481,180.0,6,6,120000);
CreateVehicle(581,484.300,-1536.117,18.458,180.0,6,6,120000);
CreateVehicle(581,490.197,-1529.292,18.751,180.0,6,6,120000);
CreateVehicle(581,487.381,-1530.532,18.749,180.0,6,6,120000);
CreateVehicle(581,484.533,-1532.032,18.705,180.0,6,6,120000);
return 1;
}
//---------------------------------------------------------
public OnPlayerConnect(playerid)
{
SetPlayerColor(playerid,0x000000FF);
SetPlayerScore(playerid,0);
GetPlayerName(playerid,player,100);
format(str,128,\"%s csatlakozott a szeróra. [Connect]\",player);
SendClientMessageToAll(0x626160FF,str);
SendClientMessage(playerid,0x0093FFFF,\"**Üdvözöllek a The Premier modban!\");
return 1;
}
//---------------------------------------------------------
public OnPlayerDisconnect(playerid, reason)
{
GetPlayerName(playerid,player,100);
switch(reason)
{
case 0: {format(str, sizeof(str), \"%s kifagyott. [Crash] \",player);SendClientMessageToAll(0xFEE401FF, str);}
case 1: {format(str, sizeof(str), \"%s lecsatlakozott. [Disconnect] \",player);SendClientMessageToAll(0x626160FF, str);}
case 2: {format(str, sizeof(str), \"%s ki lett rúgva. [Kick] \",player);SendClientMessageToAll(0xFB0B04FF, str);}
}
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
if(!IsPlayerInAnyVehicle(playerid))
{
if(gTeam[playerid] == TEAM_ATTACK)
{
if(vehicleid == premier)
{
SetPlayerColor(playerid,0xFFFF00AA);
SetPlayerCheckpoint(playerid,495.349,-1534.515,20.234,5.0);
gObjectiveAirPlayer = 1;
}
else if(gTeam[playerid] == TEAM_DEFEND && vehicleid == premier)
{
SetPlayerHealth(playerid,0);
SetPlayerToTeamColor(playerid);
SendClientMessage(playerid,0x0173FEFF,\"Többé ne szálj be a kocsiba! <szerintem.>\");
}
}
}
else if(newstate == PLAYER_STATE_ONFOOT)
{
if(playerid == gObjectiveAirPlayer)
{
gObjectiveAirPlayer = 0;
SetPlayerToTeamColor(playerid);
}
}
}
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid);
if (!IsPlayerInAnyVehicle(playerid))
{
if ( vehicleid == premier)
{
if(gTeam[playerid] == TEAM_ATTACK && vehicleid == premier)
{
GreenWin();
}
}
}
return 1;
}
public BlueWin()
{
SetTimer(\"ExitTheGameMode\", 10000, 0);
GameTextForAll(\"~w~a ~b~kek ~w~csapat nyert\",5000,0);
return 1;
}
public GreenWin()
{
SetTimer(\"ExitTheGameMode\", 10000, 0);
GameTextForAll(\"~w~a ~g~zold ~w~ csapat nyert\",5000,0);
return 1;
}
public ExitTheGameMode()
{
GameTextForAll(\"~g~mapv€lt€s~w~... ~n~kerlek v€rj~g~...\",2000,0);
SendRconCommand(\"gmx\");
}
//----------------------------------------------------------
public SetupPlayerForClassSelection(playerid)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,110.871,1024.826,14.658);
SetPlayerFacingAngle(playerid, 95.0);
SetPlayerCameraPos(playerid,109.486,1037.871,14.291);
SetPlayerCameraLookAt(playerid,110.871,1024.826,14.658);
}
//---------------------------------------------------------
public SetPlayerTeamFromClass(playerid,classid)
{
if(classid == 0 || classid == 1) {
gTeam[playerid] = TEAM_ATTACK;
} else if(classid == 2 || classid == 3 || classid == 4) {
gTeam[playerid] = TEAM_DEFEND;
}
}
//---------------------------------------------------------
public SetPlayerToTeamColor(playerid)
{
if(gTeam[playerid] == TEAM_ATTACK) {
SetPlayerColor(playerid,TEAM_ATTACK_COLOR);
} else if(gTeam[playerid] == TEAM_DEFEND) {
SetPlayerColor(playerid,TEAM_DEFEND_COLOR);
}
}
//---------------------------------------------------------
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,110.871,1024.826,14.658);
SetPlayerFacingAngle(playerid, 95.0);
SetPlayerCameraPos(playerid,109.486,1037.871,14.291);
SetPlayerCameraLookAt(playerid,110.871,1024.826,14.658);
SetPlayerTeamFromClass(playerid,classid);
if(classid == 0 || classid == 1) {
GameTextForPlayer(playerid,\"~y~Yellow ~w~Team\",500,4);
} else if(classid == 2 || classid == 3 || classid == 4) {
GameTextForPlayer(playerid,\"~b~Blue ~w~Team\",500,4);
}
return 1;
}
//---------------------------------------------------------
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,0);
if(gTeam[playerid] == TEAM_ATTACK) {
SetVehicleParamsForPlayer(premier,playerid,1,0);
SendClientMessage(playerid,0xFCE303FF,\"Lopd el az ellenfél Premier-jét 5 perc alatt.\");
}
else if(gTeam[playerid] == TEAM_DEFEND) {
SetVehicleParamsForPlayer(premier,playerid,1,1);
SendClientMessage(playerid,0x0173FEFF,\"Védd meg a Premier-t az ellenféltol 5 percig.\");
}
return 1;
}
//---------------------------------------------------------
//---------------------------------------------------------
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid == INVALID_PLAYER_ID) {
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
} else {
if(gTeam[killerid] != gTeam[playerid]) {
// Valid kill
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
GivePlayerMoney(killerid,GetPlayerMoney(killerid)+5000);
}
else {
// Team kill
SetPlayerScore(killerid,GetPlayerScore(killerid)-1);
}
}
return 1;
}
Na,az a lényeg h hiába adom meg vehicleid-nek a premier-t,nem érzékeli,szal ha beszállok akk nem be semmien checkpointot,ahogy kéne..
Ezzel má naon kivan a f*szom :S