SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 06/06/2012, 08:55 AM   #1
Josh_Main
Huge Clucker
 
Josh_Main's Avatar
 
Join Date: Mar 2012
Location: Exclusive Gaming
Posts: 290
Reputation: 8
Default Gold rims help

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;
}
Please help, thanks in advance.
__________________
Exclusive Gaming - Coming soon

IP: 172.246.255.146:7844

Website: Will open when server opens!

Teamspeak: Coming soon!
Josh_Main is offline   Reply With Quote
Old 06/06/2012, 08:58 AM   #2
Infinity90
Gangsta
 
Infinity90's Avatar
 
Join Date: Feb 2012
Location: United Kingdom
Posts: 525
Reputation: 38
Default Re: Gold rims help

Are you wanting it for a admin Rank? or Rcon admin?
__________________
Coding for money.
______________________________________________
You need to give respect to earn it.
______________________________________________
My Work
Dynamic Entrance System
EasyScript System
Infinity90 is offline   Reply With Quote
Old 06/06/2012, 08:58 AM   #3
Josh_Main
Huge Clucker
 
Josh_Main's Avatar
 
Join Date: Mar 2012
Location: Exclusive Gaming
Posts: 290
Reputation: 8
Default AW: Gold rims help

admin rank
__________________
Exclusive Gaming - Coming soon

IP: 172.246.255.146:7844

Website: Will open when server opens!

Teamspeak: Coming soon!
Josh_Main is offline   Reply With Quote
Old 06/06/2012, 09:00 AM   #4
Infinity90
Gangsta
 
Infinity90's Avatar
 
Join Date: Feb 2012
Location: United Kingdom
Posts: 525
Reputation: 38
Default Re: Gold rims help

Here, You missed something
pawn Code:
COMMAND:goldrim(playerid,params[])
{
if(IsPlayerAdmin(playerid) >= 1337) {
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
return 1; // You missed this (return 1)
}
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;
}
__________________
Coding for money.
______________________________________________
You need to give respect to earn it.
______________________________________________
My Work
Dynamic Entrance System
EasyScript System
Infinity90 is offline   Reply With Quote
Old 06/06/2012, 09:01 AM   #5
Neo Karls
Big Clucker
 
Join Date: Jan 2011
Location: Kerala, India.
Posts: 139
Reputation: 16
Default Re: Gold rims help

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
__________________
If I help you? Repute me on seen left of my Posting

Mapping for $$. Contact Me Via
libinrockstar@gmail.com
Neo Karls is offline   Reply With Quote
Old 06/06/2012, 09:01 AM   #6
_Jake_
High-roller
 
_Jake_'s Avatar
 
Join Date: Apr 2012
Location: Land of Ooo
Posts: 2,843
Reputation: 310
Default Re: Gold rims help

you have to create register/login system
__________________
Need help regarding to script? Email me by pressing this. You could find me playing at SA-MP's Project-LA, as a Senior Moderator, Ronald Lacson.

[FS] JakAdmin 3.2.1 (0.3z)
Got new unique ideas for my JakAdmin? PM me or post a suggestion on the JakAdmin topic.

#adventuretime, Jake Hero #yadayada

_Jake_ is offline   Reply With Quote
Old 06/06/2012, 09:03 AM   #7
Josh_Main
Huge Clucker
 
Josh_Main's Avatar
 
Join Date: Mar 2012
Location: Exclusive Gaming
Posts: 290
Reputation: 8
Default AW: Gold rims help

Thanks man
__________________
Exclusive Gaming - Coming soon

IP: 172.246.255.146:7844

Website: Will open when server opens!

Teamspeak: Coming soon!
Josh_Main is offline   Reply With Quote
Old 06/06/2012, 09:07 AM   #8
Josh_Main
Huge Clucker
 
Josh_Main's Avatar
 
Join Date: Mar 2012
Location: Exclusive Gaming
Posts: 290
Reputation: 8
Default AW: Gold rims help

cannot read from the file ''zcmd''
__________________
Exclusive Gaming - Coming soon

IP: 172.246.255.146:7844

Website: Will open when server opens!

Teamspeak: Coming soon!
Josh_Main is offline   Reply With Quote
Old 06/06/2012, 09:09 AM   #9
Infinity90
Gangsta
 
Infinity90's Avatar
 
Join Date: Feb 2012
Location: United Kingdom
Posts: 525
Reputation: 38
Default Re: Gold rims help

Have you got ZCMD? include or #include <zcmd> at the top of your script? If not place #include <zcmd> under a_samp include
__________________
Coding for money.
______________________________________________
You need to give respect to earn it.
______________________________________________
My Work
Dynamic Entrance System
EasyScript System
Infinity90 is offline   Reply With Quote
Old 06/06/2012, 09:19 AM   #10
Josh_Main
Huge Clucker
 
Josh_Main's Avatar
 
Join Date: Mar 2012
Location: Exclusive Gaming
Posts: 290
Reputation: 8
Default AW: Gold rims help

yeah but i dont know if i have the include, where can i download it?
__________________
Exclusive Gaming - Coming soon

IP: 172.246.255.146:7844

Website: Will open when server opens!

Teamspeak: Coming soon!
Josh_Main is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


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


All times are GMT. The time now is 03:30 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.