05.12.2012, 18:11
Now i have a new problem. This is how the script looks like now.
When i go ingame and type "/enablefly" then i get a unknow command message back whats wrong?
Код:
#include <a_samp> #include <fly> new adminfly; public OnFilterScriptInit() { print("=========================================\n"); print("Fly include demo FS by Norck"); print(" "); print("=========================================\n"); return 1; } public OnGameModeInit() { adminfly = 1; return 1; } public OnPlayerConnect(playerid) { InitFly(playerid); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext,"/enablefly",true)) { if(IsPlayerAdmin(playerid)) { adminfly = 2; return 1; } } if(!strcmp(cmdtext,"/disablefly",true)) { adminfly = 1; return 1; } if(!strcmp(cmdtext,"/fly",true)) { if (adminfly == 2) { StartFly(playerid); return 1; } else SendClientMessage(playerid, 0xFFFFFFAA, "ERROR: You have to ask a owner to enable /fly!"); return 1; } if(!strcmp(cmdtext,"/stopfly",true)) { StopFly(playerid); return 1; } return 0; }
![Cheesy](images/smilies/biggrin.png)