GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: kamionos - 2014. február 19. - 02:10:30

Cím: nem használható parancsok
Írta: kamionos - 2014. február 19. - 02:10:30
üdv!
engem olyasmi érdekelne hogy pl beirom azt hogy /god,akkor azon belül csak engedélyezett parancsok legyenek egedélyezve,a nem engedélyezettekhez meg egy clientmessageal ki lenne irva hogy Nem használhatsz parancsokat god módban!
ez hogy kivitelezhetõ??
elõre is köszönöm!
Cím: nem használható parancsok
Írta: HackFlux - 2014. február 19. - 10:58:46
Mód elejére:
 
new bool: god[MAX_PLAYERS];

 
A parancs:
 
CMD:god(playerid)
{
if(god[playerid] == false)
{
    god[playerid] = true;
    SetPlayerHealth(playerid, 9999999999999);
    SendClientMessage(playerid, -1, \"God Mód bekapcsolva.\");
}
else
{
    godplayerid] = false;
    SetPlayerHealth(playerid, 100);
    SendClientMessage(playerid, -1, \"God Mód kikapcsolva\");
}
return 1;
}

 
És ha parancsot akar és be van kapcsolva a GOD akkor:
 
CMD:fegyver(playerid, params[])
{
if(god[playerid] == false)
{
GivePlayerWeapon(playerid, 24, 14);
}
else
{
    SendClientMessage(playerid, -1, \"HIBA:Elõbb kapcsold ki a GOD Módot!\");
}
return 1;
}

 
Alakítsd át amilyenre szeretnéd,ez csak egy példa!
Cím: nem használható parancsok
Írta: kamionos - 2014. február 19. - 14:07:17
Idézetet írta: Kovacs_Richard date=1392805999\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"46605\" data-ipsquote-contentclass=\"forums_Topic

SetPlayerHealth(playerid, 9999999999999);

 
ne feküdj rá a billentyûzetre :D inkább olvass :)
http://en.wikipedia.org/wiki/2147483647
http://en.wikipedia.org/wiki/Integer_%28computer_science%29
http://en.wikipedia.org/wiki/32-bit
 
xD
az megöli nem?
Cím: nem használható parancsok
Írta: HackFlux - 2014. február 19. - 14:36:41
Mi öli meg ? Beteg vagy ? :D
Cím: nem használható parancsok
Írta: kamionos - 2014. február 19. - 14:55:23
na m1 :D
megoldódott köszönöm :)
Cím: nem használható parancsok
Írta: BoOy - 2014. február 19. - 16:42:21
[gmod]Máskor ne felejtsd el zárni a témát.[/gmod]