|
|
#1 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2012
Posts: 508
Reputation: 19
|
Okay in this tutorial you will learn that how to make a /cuff and a /uncuff command.
Okay first: Include these files. PHP Code:
PHP Code:
Now the lines I haven't explained in the script. PHP Code:
http://forum.sa-mp.com/showthread.php?t=120356 This will check that if a player enter a invalid information,if it is a invalid information,it will send him an error message. PHP Code:
for more info go here: http://wiki.sa-mp.com/wiki/Format |
|
|
|
|
|
#2 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Apr 2007
Posts: 377
Reputation: 75
|
Nice tut mate
|
|
|
|
|
|
#3 |
|
Little Clucker
![]() Join Date: Feb 2011
Posts: 36
Reputation: 0
|
Thanks mate
|
|
|
|
|
|
#4 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2012
Posts: 508
Reputation: 19
|
|
|
|
|
|
|
#5 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Dec 2011
Location: Paradise Falls, Canada
Posts: 305
Reputation: 116
|
nice tut, but change "u" to "r" by sscanf or do you want that bots can be cuffed^^
|
|
|
|
|
|
#6 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2012
Posts: 508
Reputation: 19
|
|
|
|
|
|
|
#7 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Feb 2011
Location: Australia
Posts: 819
Reputation: 60
|
Instead of checking if the player has the object attached to them, I recommend you checking if their special action is cuffed, much more efficient in my opinion.
|
|
|
|
|
|
#8 | |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Sep 2011
Location: Post Falls, ID, USA
Posts: 999
Reputation: 131
|
Quote:
Why two name variables when you only need one? Why return after the special action when there's nothing else in the command and it would just return down the line? |
|
|
|
|
|
|
#9 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2012
Posts: 508
Reputation: 19
|
Wowow thanks for the suggestions but I did not tested it so thanks for that.
|
|
|
|
|
|
#10 |
|
Big Clucker
![]() ![]() Join Date: Nov 2011
Posts: 74
Reputation: 2
|
Great Tutorial! Thanks
But ... maybe add this? uncuff RemovePlayerAttachedObject(playerid, 0); and When cuffed, you jump and fall public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_JUMP && !(oldkeys & KEY_JUMP) && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED) ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0); return 1; } |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cuff/Uncuff | striker25 | Help Archive | 47 | 17/07/2010 02:23 AM |
| Cuff/Uncuff | ScottCFR | Help Archive | 6 | 19/03/2010 02:42 PM |
| Help With Cuff and Uncuff Command | hector_williams | Help Archive | 6 | 17/03/2010 01:24 AM |
| I need a /cuff and /uncuff command | killdahobo99 | Help Archive | 45 | 28/07/2009 02:11 PM |