|
|
#1 |
|
Big Clucker
![]() ![]() Join Date: Mar 2012
Posts: 102
Reputation: 6
|
Hello, i got this code for gold rims, but anyone can use it. How can i make it so only admins can use it? ive tried if(IsPlayerAdmin(playerid) and it doesnt work. Heres the code:
HTML Code:
#define FILTERSCRIPT #include <a_samp> // Credits To SA-MP Team (: #include <zcmd> // Credits To Zeex (: new WTimer1; new WTimer2; new WTimer3; new WTimer4; new WTimer5; new WTimer6; new WTimer7; forward Wheel1(playerid); forward Wheel2(playerid); forward Wheel3(playerid); forward Wheel4(playerid); forward Wheel5(playerid); forward Wheel6(playerid); forward Wheel7(playerid); #define COLOR_ORANGE 0xFF9900AA #define COLOR_TWWHITE 0xFFFFFFAA #define COLOR_GREY 0xAFAFAFAA #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print("---------Simon Gold rims loaded---------"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { KillTimer(WTimer1); KillTimer(WTimer2); KillTimer(WTimer3); KillTimer(WTimer4); KillTimer(WTimer5); KillTimer(WTimer6); KillTimer(WTimer7); return 1; } #else main() { print("\n----------------------------------"); print("Simon Gold rims unloaded"); print("----------------------------------\n"); } #endif public OnPlayerConnect(playerid) { /*If You can Remove Credits if you want. Simon Gold rims system, Thankx*/ return 1; } public Wheel1(playerid) { KillTimer(WTimer1); AddVehicleComponent(GetPlayerVehicleID(playerid), 1080); } public OnPlayerDisconnect(playerid, reason) { return 1; } COMMAND:goldrim(playerid,params[]) { if(IsPlayerAdmin(playerid) >= 1337) { SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!"); } if(IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid, COLOR_TWWHITE, "You Successfully Turned normal rims to gold rims!"); SendClientMessage(playerid, COLOR_TWWHITE, "Thanks for using Gold Rims system by Simon."); KillTimer(WTimer2); KillTimer(WTimer3); KillTimer(WTimer4); KillTimer(WTimer5); KillTimer(WTimer6); KillTimer(WTimer7); WTimer1 = SetTimerEx("Wheel1", 600, 0, "d" ,playerid); } else { SendClientMessage(playerid, COLOR_TWWHITE, "You Must Be Inside A Vehicle To Use This Command!"); } return 1; } |
|
|
|
|
|
#2 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Feb 2012
Location: United Kingdom
Posts: 530
Reputation: 37
|
Are you wanting it for a admin Rank? or Rcon admin?
|
|
|
|
|
|
#3 |
|
Big Clucker
![]() ![]() Join Date: Mar 2012
Posts: 102
Reputation: 6
|
admin rank
|
|
|
|
|
|
#4 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Feb 2012
Location: United Kingdom
Posts: 530
Reputation: 37
|
Here, You missed something
pawn Code:
|
|
|
|
|
|
#5 |
|
Big Clucker
![]() ![]() Join Date: Jan 2011
Location: Kerala, India.
Posts: 134
Reputation: 16
|
Filterscript directly linked with Rcon Admin , So if you want to make it in admin rank you have to edit and make it in to main script (gamemode). Then only the defined admin variable works
|
|
|
|
|
|
#6 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Apr 2012
Location: Land of Ooo
Posts: 2,245
Reputation: 238
|
you have to create register/login system
|
|
|
|
|
|
#7 |
|
Big Clucker
![]() ![]() Join Date: Mar 2012
Posts: 102
Reputation: 6
|
Thanks man
|
|
|
|
|
|
#8 |
|
Big Clucker
![]() ![]() Join Date: Mar 2012
Posts: 102
Reputation: 6
|
cannot read from the file ''zcmd''
|
|
|
|
|
|
#9 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Feb 2012
Location: United Kingdom
Posts: 530
Reputation: 37
|
Have you got ZCMD? include or #include <zcmd> at the top of your script? If not place #include <zcmd> under a_samp include
|
|
|
|
|
|
#10 |
|
Big Clucker
![]() ![]() Join Date: Mar 2012
Posts: 102
Reputation: 6
|
yeah but i dont know if i have the include, where can i download it?
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to script gold rims? | Aizen | Scripting Help | 10 | 21/07/2012 05:13 PM |
| Switch/Cutter rims filterscript help[rep+] | Josh_Main | Scripting Help | 2 | 04/06/2012 01:34 AM |
| [Tutorial] Making a gold rims command | Rg-Gaming.Info | Tutorials | 20 | 29/05/2012 01:07 PM |
| Need help to create moving gates and gold rims CMD | Strech | Scripting Help | 1 | 29/05/2012 09:59 AM |
| 2010 Knight rider rims? | AiVAMAN | Everything and Nothing | 22 | 08/06/2010 09:20 PM |