[FilterScript] Simple Script [/spin]
#1

Well not much to say at this script..

Imade ​​a script boredom .. is called spin .. by using the command / spin You will see a menu of activities and Disable
When you're in a car and press Y to turn a car ..





You can take away

pawn Code:
//================
//================
#include <a_samp>
#include <zcmd>
#include <sscanf2>
//================
//================
new spin [ MAX_PLAYERS ] ;

//========Command's==========
CMD:spin ( id, params[]) {
new BigString[1900];
strcat(BigString, "{FFFFFF}Activate Spin\n{FFFFFF}Press {F81414}Activate {FFFFFF}to activate Spin Mode\n{FFFFFF}Press {F81414}Disable {FFFFFF}to disabled SpinMode", 1900 );
ShowPlayerDialog(id, 1, DIALOG_STYLE_MSGBOX, "{00B8F5}.::{FFFFFF}Spin{00B8F5}::. ",BigString, "Activate","Disable");
return 1; }

//=======Key=====

public OnPlayerKeyStateChange ( playerid , newkeys , oldkeys ) {
if ( newkeys & KEY_YES) {
if ( spin [ playerid ] == 1 ) {
if ( IsPlayerInAnyVehicle  (playerid ))
SetVehicleAngularVelocity ( GetPlayerVehicleID ( playerid ), 0.0, 0.0, 2.0); } } return 1; }

//=======Dialog=====
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if ( dialogid==1 ) {
if ( response ) {
spin[playerid] = 1;
GameTextForPlayer(playerid, "~w~Spin ~b~Activate~n~~w~Press ~b~Y ~w~to rotate", 4000, 3); }
else {
spin[playerid] = 0;
GameTextForPlayer(playerid, "~w~Spin ~b~Dezactivate", 4000, 3);  } } return 1; }

//========================================END===================================
Sorry for my English language

So do not throw (tomatoes, cucumbers or critical gave me) that anyone could create something boring stuff .. )))
Reply
#2

Hahahah,
Neat little fun script.
Good job!
Reply
#3

Nice one dude.
Reply
#4

Thank's guys
Reply
#5

ehehehe nice
+REP
Reply
#6

What a peculiar identation...

I recommend you to not create such big strings (1900 cells for 143 characters!) and to not make the dialog ID 1, make it a more remote number, because most gamemodes use dialogs and start from zero, it might conflict with other dialogs.
Reply
#7

Quote:
Originally Posted by admantis
View Post
What a peculiar identation...

I recommend you to not create such big strings (1900 cells for 143 characters!) and to not make the dialog ID 1, make it a more remote number, because most gamemodes use dialogs and start from zero, it might conflict with other dialogs.
Dialogue with the number 1 can be changed to other numbers ..

pawn Code:
#define spin 900

ShowPlayerDialog(id, spin, DIALOG_STYLE_MSGBOX, "{00B8F5}.::{FFFFFF}Spin{00B8F5}::. ",BigString, "Activate","Disable");

if ( dialogid==spin )
Reply
#8

Pretty simple, but good to take start and great for newbies to learn, +3
Reply
#9

Thank guys.. ..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)