Neon system for DonateRank -
Kyrix - 13.09.2012
Hello everybody!Im a begginer scripter and i want to know how to add to a nice Neon script founded on Internet a acces only for
Код:
if (PlayerInfo[playerid][pDonateRank] >= 1)
Here is the Script:
Код:
/*
||||||||||||||||||||||||||||||||||||||||
||Neon System By AlexzzPro ||
||Please keep the credits to me ||
||Do not re-relase without permisssion||
||Enjoy! ||
||||||||||||||||||||||||||||||||||||||||
*/
#define FILTERSCRIPT
#define COLOR_WHITE 0xFFFFFFAA
#include <a_samp>
#define NEON 1337 // Dialogid
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Neon System By AlexzzPro");
print("--------------------------------------\n");
return 1;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/neon", cmdtext, true, 10) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
SendClientMessage(playerid, COLOR_WHITE, " You are not the driver");
return 1;
}
ShowPlayerDialog(playerid, NEON, DIALOG_STYLE_LIST, "Choose your neon colour","Blue\nGreen\nYellow\nWhite\nPink\nTurn off Neon","Add","Close");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " You are not in a vehicle");
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == NEON)
{
if(response)
{
if(listitem == 0)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "blue", CreateObject(18648,0,0,0,0,0,0));
SetPVarInt(playerid, "blue1", CreateObject(18648,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "blue"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "blue1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~b~ Blue ~w~Neon has been added to your vehicle",3500,5);
}
if(listitem == 1)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "green", CreateObject(18649,0,0,0,0,0,0));
SetPVarInt(playerid, "green1", CreateObject(18649,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "green"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "green1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~g~Green ~w~Neon has been added to your vehicle",3500,5);
}
if(listitem == 2)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "yellow", CreateObject(18650,0,0,0,0,0,0));
SetPVarInt(playerid, "yellow1", CreateObject(18650,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "yellow"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "yellow1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~y~Yellow~w~ Neon has been added to your vehicle",3500,5);
}
if(listitem == 3)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "white", CreateObject(18652,0,0,0,0,0,0));
SetPVarInt(playerid, "white1", CreateObject(18652,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "white"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "white1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~w~White~w~ Neon has been added to your vehicle",3500,5);
}
if(listitem == 4)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "pink", CreateObject(18651,0,0,0,0,0,0));
SetPVarInt(playerid, "pink1", CreateObject(18651,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "pink"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "pink1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~p~Pink~w~ Neon has been added to your vehicle",3500,5);
}
if(listitem == 5)
{
DestroyObject(GetPVarInt(playerid, "blue"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "blue1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "green"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "green1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "yellow"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "yellow1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "white"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "white1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "pink"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "pink1"));
DeletePVar(playerid, "neon");
GameTextForPlayer(playerid, "~g~Neon was deleted from your vehicle",3500,5);
}
}
}
return 1;
}
Re: Neon system for DonateRank -
Kyrix - 13.09.2012
could some 1 helpme please?
Re: Neon system for DonateRank - HuSs3n - 13.09.2012
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/neon", cmdtext, true, 10) == 0)
{
if (PlayerInfo[playerid][pDonateRank] < 1) return SendClientMessage(playerid,0xFFFFFFFF,"Your Rank is Low");
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
SendClientMessage(playerid, COLOR_WHITE, " You are not the driver");
return 1;
}
ShowPlayerDialog(playerid, NEON, DIALOG_STYLE_LIST, "Choose your neon colour","Blue\nGreen\nYellow\nWhite\nPink\nTurn off Neon","Add","Close");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " You are not in a vehicle");
}
return 1;
}
return 0;
}
Re: Neon system for DonateRank - HuSs3n - 13.09.2012
delete this post
Re: Neon system for DonateRank -
Kyrix - 14.09.2012
Код:
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\neon.pwn(26) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\neon.pwn(26) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\neon.pwn(27) : warning 217: loose indentation
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\neon.pwn(30) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\neon.pwn(30) : warning 215: expression has no effect
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\neon.pwn(30) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\neon.pwn(30) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\neon.pwn(30) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Errors.
...Anybody else please
?
Re: Neon system for DonateRank -
mamorunl - 14.09.2012
Variables in a gamemode are not available in a filterscript (unless you use some playervars or god knows what). So I'd recommend OR not using it OR putting it in your gamemode like Huss3n posted
Re: Neon system for DonateRank -
Kyrix - 14.09.2012
oke thanks
will try it
Re: Neon system for DonateRank -
Kyrix - 14.09.2012
Код:
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(51005) : error 021: symbol already defined: "JB_OnPlayerCommandText"
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(51026) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(51028) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(51030) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(51032) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(51041) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(51050) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(51059) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(51068) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(51077) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(51103) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
11 Errors.
Код:
//NEON
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/neon", cmdtext, true, 10) == 0)
{
if (PlayerInfo[playerid][pDonateRank] < 1) return SendClientMessage(playerid,0xFFFFFFFF,"Your Rank is Low");
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
SendClientMessage(playerid, COLOR_WHITE, " You are not the driver");
return 1;
}
ShowPlayerDialog(playerid, NEON, DIALOG_STYLE_LIST, "Choose your neon colour","Blue\nGreen\nYellow\nWhite\nPink\nTurn off Neon","Add","Close");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " You are not in a vehicle");
}
return 1;
}
return 0;
}
ublic OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == NEON)
{
if(response)
{
if(listitem == 0)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "blue", CreateObject(18648,0,0,0,0,0,0));
SetPVarInt(playerid, "blue1", CreateObject(18648,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "blue"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "blue1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~b~ Blue ~w~Neon has been added to your vehicle",3500,5);
}
if(listitem == 1)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "green", CreateObject(18649,0,0,0,0,0,0));
SetPVarInt(playerid, "green1", CreateObject(18649,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "green"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "green1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~g~Green ~w~Neon has been added to your vehicle",3500,5);
}
if(listitem == 2)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "yellow", CreateObject(18650,0,0,0,0,0,0));
SetPVarInt(playerid, "yellow1", CreateObject(18650,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "yellow"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "yellow1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~y~Yellow~w~ Neon has been added to your vehicle",3500,5);
}
if(listitem == 3)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "white", CreateObject(18652,0,0,0,0,0,0));
SetPVarInt(playerid, "white1", CreateObject(18652,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "white"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "white1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~w~White~w~ Neon has been added to your vehicle",3500,5);
}
if(listitem == 4)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "pink", CreateObject(18651,0,0,0,0,0,0));
SetPVarInt(playerid, "pink1", CreateObject(18651,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "pink"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "pink1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~p~Pink~w~ Neon has been added to your vehicle",3500,5);
}
if(listitem == 5)
{
DestroyObject(GetPVarInt(playerid, "blue"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "blue1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "green"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "green1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "yellow"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "yellow1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "white"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "white1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "pink"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "pink1"));
DeletePVar(playerid, "neon");
GameTextForPlayer(playerid, "~g~Neon was deleted from your vehicle",3500,5);
}
}
}
return 1;
}
Re: Neon system for DonateRank -
Kyrix - 14.09.2012
Код:
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(837) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(839) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(840) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(842) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(845) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(849) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(853) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(855) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(859) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(861) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(863) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(872) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(881) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(890) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(899) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(908) : error 010: invalid function or declaration
C:\Documents and Settings\Gabi\Desktop\samp04\pawno\godfatherNEW5.pwn(934) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
after i removed
Код:
public OnPlayerCommandText(playerid, cmdtext[])
Re: Neon system for DonateRank -
DarkBr - 01.04.2017
Good!