Hello, i have this script that suppose to change vehicles color, but it dont show anything after i pick color.
Код:
#define FILTERSCRIPT
#include <a_samp>
#include <float>
#if defined FILTERSCRIPT
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREY 0xAFAFAFAA// INFO text messages
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA// warning messages
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTGREEN 0x7FFF00
#define COLOR_DARKGREEN 0x006400
#define COLOR_LIGHTBLUE 0x91C8FF//Server text messages
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_GROUPTALK 0x87CEEBAA // SKYBLUE
#define COLOR_MENU 0xFFFFFFAA
#define COLOR_SYSTEM_PM 0x66CC00AA // LIGHT GREEN
#define COLOR_SYSTEM_PW 0xFFFF33AA // YELLOW
new pay1;
new pay2;
new pay3;
new pay4;
new pay5;
new pay6;
forward pkpoczasie1();
forward pkpoczasie2();
forward pkpoczasie3();
forward pkpoczasie4();
forward pkpoczasie5();
forward pkpoczasie6();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Pay 'n' Spray by Tony");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
main()
{
}
#endif
public pkpoczasie1()
{
pay1 = CreatePickup(2894, 14, 1851.5520, -1862.9827, 13.5781, -1);
}
public pkpoczasie2()
{
pay2 = CreatePickup(2894, 14, 2472.4573, -1755.4440, 13.5469, -1);
}
public pkpoczasie3()
{
pay3 = CreatePickup(2894, 14, 2490.1780, -1297.6809, 31.9634, -1);
}
public pkpoczasie4()
{
pay4 = CreatePickup(2894, 14, 1787.0812, -1295.7665, 13.4446, -1);
}
public pkpoczasie5()
{
pay5 = CreatePickup(2894, 14, 843.2631, -1449.3475, 13.5837, -1);
}
public pkpoczasie6()
{
pay6 = CreatePickup(2894, 14, 278.7424, -1265.0798, 73.9453, -1);
}
public OnPlayerConnect(playerid)
{
pay1 = CreatePickup(1248, 14, 1851.5520, -1862.9827, 13.5781, -1);
pay2 = CreatePickup(1248, 14, 2472.4573, -1755.4440, 13.5469, -1);
pay3 = CreatePickup(1248, 14, 2490.1780, -1297.6809, 31.9634, -1);
pay4 = CreatePickup(1248, 14, 1787.0812, -1295.7665, 13.4446, -1);
pay5 = CreatePickup(1248, 14, 843.2631, -1449.3475, 13.5837, -1);
pay6 = CreatePickup(1248, 14, 278.7424, -1265.0798, 73.9453, -1);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid==pay1)
{
ShowPlayerDialog(playerid, 902, DIALOG_STYLE_LIST, "Pay & Spray", "1. Czarny\n2. Biały\n3. Czerwony\n4. Żуłty\n5. Niebieski", "Zmień", "Anuluj");
}
if(pickupid==pay2)
{
ShowPlayerDialog(playerid, 902, DIALOG_STYLE_LIST, "Pay & Spray", "1. Czarny\n2. Biały\n3. Czerwony\n4. Żуłty\n5. Niebieski", "Zmień", "Anuluj");
}
if(pickupid==pay3)
{
ShowPlayerDialog(playerid, 902, DIALOG_STYLE_LIST, "Pay & Spray", "1. Czarny\n2. Biały\n3. Czerwony\n4. Żуłty\n5. Niebieski", "Zmień", "Anuluj");
}
if(pickupid==pay4)
{
ShowPlayerDialog(playerid, 902, DIALOG_STYLE_LIST, "Pay & Spray", "1. Czarny\n2. Biały\n3. Czerwony\n4. Żуłty\n5. Niebieski", "Zmień", "Anuluj");
}
if(pickupid==pay5)
{
ShowPlayerDialog(playerid, 902, DIALOG_STYLE_LIST, "Pay & Spray", "1. Czarny\n2. Biały\n3. Czerwony\n4. Żуłty\n5. Niebieski", "Zmień", "Anuluj");
}
if(pickupid==pay6)
{
ShowPlayerDialog(playerid, 902, DIALOG_STYLE_LIST, "Pay & Spray", "1. Czarny\n2. Biały\n3. Czerwony\n4. Żуłty\n5. Niebieski", "Zmień", "Anuluj");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 902)
{
if(response == 1)
{
switch(listitem)
{
case 0: //czarny
{
if(GetPlayerMoney(playerid) >= 500)
{
ChangeVehicleColor(GetPlayerVehicleID(playerid), 0, 0);
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid,COLOR_WHITE, "Przemalowałeś swуj samochуd!");
return 1;
}
}
case 1: //bialy
{
if(GetPlayerMoney(playerid) >= 500)
{
ChangeVehicleColor(GetPlayerVehicleID(playerid), 1, 1);
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid,COLOR_WHITE, "Przemalowałeś swуj samochуd!");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_RED, "Nie masz tyle pieniędzy!");
}
}
case 2: //czerwony
{
if(GetPlayerMoney(playerid) >= 500)
{
ChangeVehicleColor(GetPlayerVehicleID(playerid), 3, 3);
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid,COLOR_WHITE, "Przemalowałeś swуj samochуd!");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_RED, "Nie masz tyle pieniędzy!");
}
}
case 3: //zolty
{
if(GetPlayerMoney(playerid) >= 500)
{
ChangeVehicleColor(GetPlayerVehicleID(playerid), 6, 6);
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid,COLOR_WHITE, "Przemalowałeś swуj samochуd!");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_RED, "Nie masz tyle pieniędzy!");
}
}
case 4: //niebieski
{
if(GetPlayerMoney(playerid) >= 500)
{
ChangeVehicleColor(GetPlayerVehicleID(playerid), 211, 211);
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid,COLOR_WHITE, "Przemalowałeś swуj samochуd!");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_RED," Nie masz tyle pieniędzy!");
}
}
}
}
}
return 1;
}