[FilterScript] Simple Script [/spin] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Simple Script [/spin] (
/showthread.php?tid=442911)
Simple Script [/spin] -
(SC)=Sky= - 09.06.2013
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 .. )))
Re: Simple Script [/spin] -
Jason_Dealley - 09.06.2013
Hahahah,
Neat little fun script.
Good job!
Re: Simple Script [/spin] -
Smokkr - 09.06.2013
Nice one dude.
Re: Simple Script [/spin] -
(SC)=Sky= - 09.06.2013
Thank's guys
Re: Simple Script [/spin] -
[UG]Daniel - 09.06.2013
ehehehe nice
+REP
Re: Simple Script [/spin] -
admantis - 09.06.2013
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.
Re: Simple Script [/spin] -
(SC)=Sky= - 10.06.2013
Quote:
Originally Posted by admantis
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 )
Re: Simple Script [/spin] -
XtremeR - 10.06.2013
Pretty simple, but good to take start and great for newbies to learn, +3
Re: Simple Script [/spin] -
(SC)=Sky= - 12.06.2013
Thank guys..
..