Szerző Téma: Rendör Vs civil v0.1  (Megtekintve 1629 alkalommal)

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Rendör Vs civil v0.1
« Dátum: 2012. január 24. - 14:20:02 »
0 Show voters
Üdv felrakom az általam \"készitett kis gmet\" de ha lesz idõm tovább fejlesztem és feltöltöm a lusta népségnek :)
Kod:[pawn]
#include <a_samp>
#include <zcmd>
#define WEAPON_TYPE_NONE    (0)
#define WEAPON_TYPE_HEAVY   (1)
#define WEAPON_TYPE_LIGHT   (2)
#define WEAPON_TYPE_MELEE   (3)//Nahkampf
new OldWeapon[MAX_PLAYERS];
new HoldingWeapon[MAX_PLAYERS];
new gTeam[MAX_PLAYERS];
#define TEAM_RENDOR 0
#define TEAM_CIVIL 1
#define TEAM_TAXIS 2
#define TEAM_MENTOS 3
#undef MAX_PLAYERS
#define MAX_PLAYER 32
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_WHITE 0xFFFFFFAA
#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
#define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
public OnGameModeInit()
{
UsePlayerPedAnims();
//rendür skin:
AddPlayerClass(280, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Police
AddPlayerClass(281, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Police
AddPlayerClass(282, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Police
AddPlayerClass(283, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Police
AddPlayerClass(284, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Police
AddPlayerClass(288, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Police
AddPlayerClass(7, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian 0
AddPlayerClass(11, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(19, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(21, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(23, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(28, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian 5
AddPlayerClass(29, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(46, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(47, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(59, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(98, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian 10
AddPlayerClass(101, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(116, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(124, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(186, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(188, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian 15
AddPlayerClass(223, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(240, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
AddPlayerClass(58, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Civilian
//kocsik
AddStaticVehicle(596,1535.8967,-1666.3201,13.1027,0.2065,0,1); //
AddStaticVehicle(596,1535.6672,-1678.0308,13.0990,178.8805,0,1); //
SetGameModeText(\"[HUN]Civilek vs Sünkutyák Béta\");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if(classid >= 1 && classid <= 6)
{
   GameTextForPlayer(playerid, \"~b~Rendortiszt\", 3000, 3);
   SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid, 214.7581,-41.0411,1002.0234);
    SetPlayerFacingAngle(playerid, 94.0821);
    SetPlayerCameraPos(playerid, 212.6498,-41.0299,1002.0234);
        SetPlayerCameraLookAt(playerid, 214.7581,-41.0411,1002.0234);
        }else if(classid >= 7 && classid <= 19)
{
   GameTextForPlayer(playerid, \"~w~Civil\", 3000, 3);
   SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid, 214.7581,-41.0411,1002.0234);
    SetPlayerFacingAngle(playerid, 94.0821);
    SetPlayerCameraPos(playerid, 212.6498,-41.0299,1002.0234);
        SetPlayerCameraLookAt(playerid, 214.7581,-41.0411,1002.0234);
}
return 1;
}
public OnPlayerConnect(playerid)
{
OldWeapon[playerid]=0;
HoldingWeapon[playerid]=0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid,0);
if(gTeam[playerid] == TEAM_RENDOR)
{
GivePlayerWeapon(playerid,29,900);
GivePlayerWeapon(playerid,24,900);
GivePlayerWeapon(playerid,31,900);
SetPlayerColor(playerid,COLOR_BLUE);
SendClientMessage(playerid,-1,\"Te a rendõr csapatba vagy a Parancsaid:\");
SendClientMessage(playerid,-1,\"/detain , /bilincs , /buntet, /rjail , /felhivasok\");
SetPlayerPos(playerid,1547.1265,-1675.3710,13.9445);
} else if(gTeam[playerid] == TEAM_CIVIL)
{
GivePlayerWeapon(playerid,27,900);
GivePlayerWeapon(playerid,23,900);
GivePlayerWeapon(playerid,30,900);
SetPlayerColor(playerid,COLOR_WHITE);
SendClientMessage(playerid,-1,\"CIVIL VAGY a Parancsaid:\");
SendClientMessage(playerid,-1,\"/jogsitad /pay /reclass (Csak a korháznál lehet karit váltani!) /blow [iD] ,/buyc4 , és /playlist\");
}else if(gTeam[playerid] == TEAM_TAXIS)
{
SendClientMessage(playerid,-1,\"Taxis vagy neked nincsen parancsod\");
SetPlayerColor(playerid,COLOR_GREEN);
GivePlayerWeapon(playerid,24,100);
}else if(gTeam[playerid] == TEAM_MENTOS)
{
SendClientMessage(playerid,-1,\"Mentõ szolgálatba léptél parancsaid:\");
SendClientMessage(playerid,-1,\"/heal ID\");
GivePlayerWeapon(playerid,24,100);
SetPlayerColor(playerid,COLOR_PINK);
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate==PLAYER_STATE_ONFOOT)
{
   StopPlayerHoldingObject(playerid);
   OldWeapon[playerid]=0;
   HoldingWeapon[playerid]=0;
}
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
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 OnPlayerUpdate(playerid)
{
if(GetPlayerState(playerid)==PLAYER_STATE_ONFOOT)
{
   new weaponid=GetPlayerWeapon(playerid),oldweapontype=GetWeaponType(OldWeapon[playerid]);
   new weapontype=GetWeaponType(weaponid);
   if(HoldingWeapon[playerid]==weaponid)
       StopPlayerHoldingObject(playerid);
   if(OldWeapon[playerid]!=weaponid)
   {
       new modelid=GetWeaponModel(OldWeapon[playerid]);
       if(modelid!=0 && oldweapontype!=WEAPON_TYPE_NONE && oldweapontype!=weapontype)
       {
           HoldingWeapon[playerid]=OldWeapon[playerid];
           switch(oldweapontype)
           {
               case WEAPON_TYPE_LIGHT:
               SetPlayerHoldingObject(playerid, modelid, 8,0.0,-0.1,0.15, -100.0, 0.0, 0.0);
            case WEAPON_TYPE_MELEE:
                SetPlayerHoldingObject(playerid, modelid, 7,0.0,0.0,-0.18, 100.0, 45.0, 0.0);
            case WEAPON_TYPE_HEAVY:
                SetPlayerHoldingObject(playerid, modelid, 1, 0.2,-0.125,-0.1,0.0,25.0,180.0);
           }
       }
   }
   if(oldweapontype!=weapontype)
      OldWeapon[playerid]=weaponid;
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
GetWeaponType(weaponid)
{
switch(weaponid)
{
    case 22,23,24,26,28,32:
        return WEAPON_TYPE_LIGHT;
   case 3,4,16,17,18,39,10,11,12,13,14,40,41:
       return WEAPON_TYPE_MELEE;
   case 2,5,6,7,8,9,25,27,29,30,31,33,34,35,36,37,38:
       return WEAPON_TYPE_HEAVY;
}
return WEAPON_TYPE_NONE;
}
stock GetWeaponModel(weaponid)
{
switch(weaponid)
{
    case 1:
        return 331;
   case 2..8:
       return weaponid+331;
        case 9:
       return 341;
   case 10..15:
      return weaponid+311;
   case 16..18:
       return weaponid+326;
   case 22..29:
       return weaponid+324;
   case 30,31:
       return weaponid+325;
   case 32:
       return 372;
   case 33..45:
       return weaponid+324;
   case 46:
       return 371;
}
return 0;
}[/pawn]

Nem elérhető Dead

  • 2045
    • Profil megtekintése
Rendör Vs civil v0.1
« Válasz #1 Dátum: 2012. január 24. - 14:21:41 »
0 Show voters
egész jó :)

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Rendör Vs civil v0.1
« Válasz #2 Dátum: 2012. január 24. - 14:29:18 »
0 Show voters
Idézetet írta: Dead date=1327411301\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"16037\" data-ipsquote-contentclass=\"forums_Topic
egész jó :)
 
Ha lesz idõm fejlesztem , és akkor talán\"nyitok \" vele szervert.

Swat

  • Vendég
Rendör Vs civil v0.1
« Válasz #3 Dátum: 2012. január 24. - 15:39:22 »
0 Show voters
Kiprobáltam nekem tetszik szép munka :)

Nem elérhető KDDomi

  • 976
    • Profil megtekintése
Rendör Vs civil v0.1
« Válasz #4 Dátum: 2012. január 24. - 16:15:11 »
0 Show voters
Csak énvagyok vak vagy tényleg nemlátok benne OnPlayerCommandText részt?

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Rendör Vs civil v0.1
« Válasz #5 Dátum: 2012. január 24. - 16:18:57 »
0 Show voters
<-\" post=\"216031\" timestamp=\"1327418111\"]
Csak énvagyok vak vagy tényleg nemlátok benne OnPlayerCommandText részt?
 
[/quote]
zcmd s lett volna a gm de ha lesz idõm parancsokat is irok bele!

Dupla hozzászólás automatikusan összefûzve. ( 2012. január 24. - 16:19:16 )

addig zárom a témát.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal