19.12.2010, 15:55
OnDialogResponse - wiki it. Besides you have many mistakes in your code. Lemme fix it ( idk if it will be working )
Im not so good at scripting but think it will work, lol.
// edit oh shit I've managed to mis-understood.
Use this code, for ProxDetector to work.
this forward on top of the script under defines:
This after the dialog response:
All I can do lol. Hope it helped!
pawn Код:
if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,_COLOR_GREY,"You cannot afford this!") return 1;
{
SetPlayerArmour(playerid, 100);
GivePlayerMoney(playerid, -2000);
SendClientMessage(playerid, _COLOR_CYAN, "* You have chosen a Kevlar Vest!");
return 1;
}
// edit oh shit I've managed to mis-understood.
Use this code, for ProxDetector to work.
this forward on top of the script under defines:
pawn Код:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
pawn Код:
if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,_COLOR_GREY,"You cannot afford this!") return 1;
{
SetPlayerArmour(playerid, 100);
GivePlayerMoney(playerid, -2000);
format(string, sizeof(string), "You have chosen a Kevlar Vest!");
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 1;
}