mateiualex Posted January 7, 2016 Share Posted January 7, 2016 Salut baieti, am o problema. Am acest sistem de fly http://forum.sa-mp.com/showthread.php?t=309467si efectiv nu pot sa pun restrictie de admin in fs. Ma poate ajuta cineva va rog? Link to comment Share on other sites More sharing options...
.CristiaN Posted January 7, 2016 Share Posted January 7, 2016 Poftim comanda fly: CMD:fly(playerid, params[]) { if(playerVariables[playerid][pAdminLevel] >= 1) { if(playerVariables[playerid][pWarrants] == 0) { if(AFK[playerid] == 0) { if(playerVariables[playerid][pPrisonTime] == 0) { if(groupVariables[playerVariables[playerid][pGroup]][gInWar] == 0) { StartFly(playerid); SetPlayerHealth(playerid, 9999999999999999999999999999999999.0); } else SendClientMessage(playerid, COLOR_GREY, "You can't use this command in war time."); } else SendClientMessage(playerid, COLOR_GREY, "You can't spectate because you are sleeping."); } else SendClientMessage(playerid, COLOR_GREY, "You can't spectate because you are in jail."); } else SendClientMessage(playerid, COLOR_GREY, "You are wanted, you can't spectante anyone."); } return 1; } CMD:stopfly(playerid, params[]) { if(playerVariables[playerid][pAdminLevel] >= 1) { StopFly(playerid); SetPlayerHealth(playerid, 100.0); } return 1; } adauga in gm. 1 Link to comment Share on other sites More sharing options...
Alynush02 Posted January 7, 2016 Share Posted January 7, 2016 Poftim comanda fly: CMD:fly(playerid, params[]) { if(playerVariables[playerid][pAdminLevel] >= 1) { if(playerVariables[playerid][pWarrants] == 0) { if(AFK[playerid] == 0) { if(playerVariables[playerid][pPrisonTime] == 0) { if(groupVariables[playerVariables[playerid][pGroup]][gInWar] == 0) { StartFly(playerid); SetPlayerHealth(playerid, 9999999999999999999999999999999999.0); } else SendClientMessage(playerid, COLOR_GREY, "You can't use this command in war time."); } else SendClientMessage(playerid, COLOR_GREY, "You can't spectate because you are sleeping."); } else SendClientMessage(playerid, COLOR_GREY, "You can't spectate because you are in jail."); } else SendClientMessage(playerid, COLOR_GREY, "You are wanted, you can't spectante anyone."); } return 1; } CMD:stopfly(playerid, params[]) { if(playerVariables[playerid][pAdminLevel] >= 1) { StopFly(playerid); SetPlayerHealth(playerid, 100.0); } return 1; } adauga in gm. Te-ai gandit ca el are alte variabile? Nu? Esti un adevarat scripter, lasa-te. Link to comment Share on other sites More sharing options...
mateiualex Posted January 7, 2016 Author Share Posted January 7, 2016 (edited) Poftim comanda fly: CMD:fly(playerid, params[]) { if(playerVariables[playerid][pAdminLevel] >= 1) { if(playerVariables[playerid][pWarrants] == 0) { if(AFK[playerid] == 0) { if(playerVariables[playerid][pPrisonTime] == 0) { if(groupVariables[playerVariables[playerid][pGroup]][gInWar] == 0) { StartFly(playerid); SetPlayerHealth(playerid, 9999999999999999999999999999999999.0); } else SendClientMessage(playerid, COLOR_GREY, "You can't use this command in war time."); } else SendClientMessage(playerid, COLOR_GREY, "You can't spectate because you are sleeping."); } else SendClientMessage(playerid, COLOR_GREY, "You can't spectate because you are in jail."); } else SendClientMessage(playerid, COLOR_GREY, "You are wanted, you can't spectante anyone."); } return 1; } CMD:stopfly(playerid, params[]) { if(playerVariables[playerid][pAdminLevel] >= 1) { StopFly(playerid); SetPlayerHealth(playerid, 100.0); } return 1; } adauga in gm. Am modificat ceea ce mi-ai dat tu dupa variabilele mele, oricum varianta ta este foarte complexa. Eu m-am apcuat de un GM de la 0. La mine arata cam asa cod-ul CMD:fly(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 1) { { StartFly(playerid); SendClientMessage(playerid, COLOR_GREEN, "SERVER: Flying system ON!"); SetPlayerHealth(playerid, 9999999999999999999999999999999999.0); SetPlayerArmour(playerid, 9999999999999999999999999999999999.0); } } else { SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!"); } return 1; } CMD:stopfly(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 1) { StopFly(playerid); SendClientMessage(playerid, COLOR_GREEN, "SERVER: Flying system OFF!"); SetPlayerHealth(playerid, 100.0); SetPlayerArmour(playerid, 0); } else { SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!"); } return 1; } Te-ai gandit ca el are alte variabile? Nu? Esti un adevarat scripter, lasa-te. Am modificat eu. Ceea ce nu stiam este cum pun restrictia la admin, eu incercam sa o pun in fs, dar am uitat cu totul de include si ca pot face legatura cu Startfly / Stopfly definind <fly>. Am rezolvat acum :D. Sunt la inceput oricum si incerc sa invat pe parcurs alaturi de un prieten. Edited January 7, 2016 by Netistul Link to comment Share on other sites More sharing options...
Recommended Posts