Send a message to everyone near (Yeah ProxDetector)
#3

OnDialogResponse - wiki it. Besides you have many mistakes in your code. Lemme fix it ( idk if it will be working )

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;
                }
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:
pawn Код:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
This after the dialog response:

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;
                }
All I can do lol. Hope it helped!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)