Mindent megtalálsz a fórumon.
Remélem segítettem. ::|
//===========================================//
//////////////////////////////////////////////
///// Rendõr és Tûzoltó munka /////
////////////////////////////////////////////
//=======================================//
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define TEAM_FIREFIGHTERS 0
#define TEAM_POLICEMAN 1
#define TEAM_CIVILIAN 2
new gTeam[MAX_PLAYERS];
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\"========= Rendõr és Tûzoltó =========\");
print(\"========= MUNKA =========\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print(\"\\n----------------------------------\");
print(\" Blank Gamemode by your name here\");
print(\"----------------------------------\\n\");
}
#endif
CMD:tuzolto(playerid, params[])
{
if(gTeam[playerid] == TEAM_POLICEMAN) return SendClientMessage(playerid, 0xff5900AA, \"Elõbb ki kell lépned, hogy új munkát vállalhass(/exitjob).\");
{
gTeam[playerid] = TEAM_FIREFIGHTERS;
SendClientMessage(playerid, 0x0900ffAA, \"Gratulálok! Tûzoltó lettél!\");
SetPlayerSkin(playerid,278);
GivePlayerWeapon(playerid, 42, 200);
}
return 1;
}
CMD:police(playerid, params[])
{
if(gTeam[playerid] == TEAM_FIREFIGHTERS) return SendClientMessage(playerid, 0xff5900AA, \"Elõbb ki kell lépned, hogy új munkát vállalhass(/exitjob).\");
{
gTeam[playerid] = TEAM_POLICEMAN;
SendClientMessage(playerid, 0x0900ffAA, \"Gratulálok! Rendõr lettél!\");
SetPlayerSkin(playerid,266);
GivePlayerWeapon(playerid, 24, 200);
}
return 1;
}
CMD:exitjob(playerid, params[])
{
gTeam[playerid] = TEAM_CIVILIAN;
SendClientMessage(playerid,0x0900ffAA, \"Nem dolgozol többé.\");
ResetPlayerWeapons(playerid);
return 1;
}
CMD:find(playerid, params[])
{
new celpont;
new celpontnev[MAX_PLAYER_NAME];
GetPlayerName(playerid, celpontnev, sizeof(celpontnev));
new string[32];
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////===
if(gTeam[playerid] == TEAM_POLICEMAN) //===
{ //===
if(sscanf(params, \"u\", celpont)) return SendClientMessage(playerid, 0xff5900AA, \"Használat: /find [Név/ID]\"); //===
{ //===
if(IsPlayerConnected(celpont)) return SendClientMessage(playerid, 0xff5900AA, \"A játékos nem online.\"); //===
{ //===
format(string, sizeof(string), \"Megtaláltad %s-t.\", celpontnev); //===
SendClientMessage(playerid, 0x0900ffAA, string); //===
SetPlayerMarkerForPlayer(playerid, celpont, 0xff5900AA); //=== //===
} //===
} //===
} //===
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////===
if(gTeam[playerid] == TEAM_FIREFIGHTERS) //===
{ //===
if(sscanf(params, \"u\", celpont)) return SendClientMessage(playerid, 0xff5900AA, \"Használat: /find [Név/ID]\"); //===
{ //===
if(!IsPlayerConnected(celpont)) return SendClientMessage(playerid, 0xff5900AA, \"A játékos nem online.\"); //===
{ //===
format(string, sizeof(string), \"Megtaláltad %s-t.\", celpontnev); //===
SendClientMessage(playerid, 0x0900ffAA, string); //===
SetPlayerMarkerForPlayer(playerid, celpont, 0xff5900AA); //===
} //===
} //===
} //===
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////===
if(gTeam[playerid] == TEAM_CIVILIAN) //===
{ //===
SendClientMessage(playerid, 0xff5900AA, \"Ezt a parancsot nem hsználhatod.\"); //===
} //===
return 1; //===
} //===
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////===
A sok comment a parancsok között szintén az átláthatóság kedvéért van.
Így nagyon össze-visszahánytnak tûnhet de pawnoban sokkal rendezettebb...