Sākumā jums būs vaijdzīga šāda programma - GTA SAMP Map Construction(spiežat uz nosaukuma ja vēlaties downloadu) vai MTA Map Editor , bet es iesaku labāk SAMP Map Construction programmu.
Mana taisītā bāze izskatīsies apm. šādi -
Sākam ar kodu -
Code: Select all
#include
Code: Select all
new M4, Sawn, Deagle, TEC9, Sniper, Grenade, HP, Armour,Gate1,BoatGate1
forward AutoKill(playerid);
Tad rakstam;
Code: Select all
public OnFilterScriptInit()
Code: Select all
M4= CreatePickup(356,3785, -1455.8438, 368.2031, 7.1484, 0.25);
356 - Modeļa ID
2 - Pickupa tips
Un pašas pēdējās ir kordinātes.
Un tā pārējiem ieročiem.
Nākamie ir objekti , kas uz manējās bāzes ir -
Code: Select all
CreateObject(987, -1422.33618, 370.72739, 6.18420, 0.00000, 0.00000, 900.00000);
CreateObject(987, -1378.89026, 370.70163, 6.18420, 0.00000, 0.00000, 900.00000);
CreateObject(972, -1343.95276, 352.03430, -1.10000, 0.00000, 0.00000, 0.00000);
CreateObject(16773, -1340.69653, 355.54166, -5.00000, 0.00000, 0.00000, 90.00000);
CreateObject(16773, -1340.77466, 355.56888, -9.00000, 0.00000, 0.00000, 90.00000);
CreateObject(16773, -1340.65723, 369.32510, 10.00000, 0.00000, 0.00000, 90.00000);
CreateObject(16773, -1340.60681, 341.06250, 10.00000, 0.00000, 0.00000, 90.00000);
CreateObject(16773, -1340.55627, 354.85764, 10.00000, 0.00000, 0.00000, 90.00000);
CreateObject(16773, -1340.42798, 351.89633, 17.00000, 0.00000, 0.00000, 90.00000);
CreateObject(16773, -1340.48792, 366.24240, 17.00000, 0.00000, 0.00000, 90.00000);
CreateObject(972, -1464.78345, 367.29047, 6.17440, 0.00000, 0.00000, 90.00000);
Next - Uzrakstam lūk šo ;
Code: Select all
public OnPlayerPickUpPickup(playerid,pickupid)
{
if(pickupid==M4) return GivePlayerWeapon(playerid,31,10000);
Code: Select all
...(pickupid==M4)...
Nākamais ir HP un Bruņas ;
Code: Select all
if(pickupid==HP) return SetPlayerHealth(playerid,100);
if(pickupid==Armour) return SetPlayerArmour(playerid,100);
Tagad vārti:;
Code: Select all
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/opengate",true))
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,sizeof(Name));
if(strfind(Name, "Liekat Klana tagu šeit", false) != -1) //
{
if(GatesOpen==false)
{
MoveObject(Gate1,-1343.95276, 352.03430, -1.10000, 0.00000, 0.00000, 0.00000));
MoveObject(BoatGate1,-1464.78345, 367.29047, 6.17440, 0.00000, 0.00000, 90.00000);
GatesOpen=true;
SendClientMessage(playerid,0x00FF00FF,"Bāze: {FFFFFF}Vārti tika atvērti!");
}
else if(GatesOpen==true)
{
MoveObject(Gate1,-1343.95276, 352.03430, -1.10000, 0.00000, 0.00000, 0.00000);
MoveObject(BoatGate1,-1464.78345, 367.29047, 6.17440, 0.00000, 0.00000, 90.00000);
GatesOpen=false; // Vārti aizvērti.
SendClientMessage(playerid,0xFF0000FF,"Bāze: {FFFFFF}Vārti tika aizvērti!");
}
}
else // .
{
SendClientMessage(playerid,0xFF0000FF,"Tev nav tiesību to darīt!");
}
return 1;
}
return 0;
}
Un pēdejā lieta AK (Auto-Kill)
Code: Select all
public AutoKill(playerid)
{
if(IsPlayerInArea(playerid,3785, -1455.8438, 368.2031, 7.1484, 0.25))
{
SetPlayerHealth(playerid,0);
SendClientMessage(playerid,0xFF0000FF,"Tu tiki automātiski nogalināts!");
}
else
{
InZone[playerid]=false;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
InZone[playerid]=false;
return 1;
}
Ja ir Errori tad dodat šim puikam - [NF]Sweppe
Par mašīnām - Liekiet caur programmu vai ejat savā serverī , spawnojat tad rakstat /save , un ejat savedpositions.txt pie GTA SAN ANDREAS USER FILE'iem kas atrodas jūsu dokumentos.