Pentru inceput aveti nevoie de un include.
#include <fly>Acum vom face comanda:
CMD:fly(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te comenctezi."); // aici verificam daca esti conectat
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1) // aici punem nivelul de admin necesar pentru a folosii comanda.
{
new sendername[30],string[256];
if(flymode[playerid] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername)); // aici obtinem numele adminuui.
togfind[playerid] = 0;
flymode[playerid] = 1;
format(string,sizeof(string),"{DFF230}%s este acum in modul fly-mode.", sendername);
ABroadCast(COLOR_ORANGE,string,1);
InitFly(playerid);
StartFly(playerid);
SetPlayerHealthEx(playerid, 10000000); // aici setam hp-ul.
}
else
{
GetPlayerName(playerid, sendername, sizeof(sendername)); // iar de aici oprim fly-ul.
togfind[playerid] = 1;
flymode[playerid] = 0;
format(string,sizeof(string),"{F89AD6}Ai oprit fly-mode-ul", sendername);
SCM(playerid, COLOR_GREEN, string);
StopFly(playerid);
SetPlayerHealthEx(playerid, 100); //
}
}
else return SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
}
return 1;
}Mihai s-a nascut intr-o cabana construita de el.
Mihai a omorat 50 de teroristi din 2 gloante.Primul a fost de avertizare.
Mihai poate sa isi faca poze cu telefonul fix.
Mihai a raspuns la un apel pierdut.
Singura femeie care si-a permis sa faca glume despre Mihai a fost Elodia, de aia nu mai este.
Cand Mihai iti arata degetul nu o face ca sa te injure... doar iti arata cate secunde mai ai de trait!
You are not allowed to view links. Register or Login to view.
You are not allowed to view links. Register or Login to view. You are not allowed to view links. Register or Login to view.



