ProxDector Help.
#1

So i wanted to ask how do i add a me when a weapon is scrolled, like

Код:
				format(string, sizeof(string), "* %s takes his bag of his back and takes out a %s.", sendername, gunname);
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
But where' do i put this code, thanks in advance
Reply
#2

pawn Код:
if(strcmp(cmd, "/me", true) == 0){
    new text[512], tmp[512], me_name[MAX_PLAYER_NAME];

    tmp = strrest(cmdtext, idx);
    if(!strlen(tmp)){
    SendClientMessage(playerid, COLOR_GREY, "USAGE: /me [text]");
    return 1;
    }
    GetPlayerName(playerid, me_name, sizeof(me_name));
    format(text, sizeof(text), "%s %s", me_name, tmp);
    ProxDetector(10.0, playerid, text, COLOR_PINK, COLOR_PINK, COLOR_PINK, COLOR_PINK, COLOR_PINK);
    return 1;
    }
    if(strcmp(cmd, "/do", true) == 0){
    new text[512], tmp[512], do_name[MAX_PLAYER_NAME];

    tmp = strrest(cmdtext, idx);
    if(!strlen(tmp)){
    SendClientMessage(playerid, COLOR_GREY, "USAGE: /do [text]");
    return 1;
    }
    GetPlayerName(playerid, do_name, sizeof(do_name));
    format(text, sizeof(text), "%s ((%s))", tmp, do_name);
    ProxDetector(10.0, playerid, text, COLOR_PINK, COLOR_PINK, COLOR_PINK, COLOR_PINK, COLOR_PINK);
    return 1;
    }
try this /me
Reply
#3

Use THIS include and put it inside
pawn Код:
OnPlayerWeaponChange(playerid, newweapon, oldweapon)
Here is an example
pawn Код:
OnPlayerWeaponChange(playerid, newweapon, oldweapon)
{
    new gunname[25];
    new string[128];
    GetWeaponName(newweapon, gunname);//Make it yourself
    format(string, sizeof(string), "* %s takes his bag of his back and takes out a %s.", GetPlayerName(playerid), gunname);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
Reply
#4

Quote:
Originally Posted by Dark_Kostas
Use THIS include and put it inside
pawn Код:
OnPlayerWeaponChange(playerid, newweapon, oldweapon)
Here is an example
pawn Код:
OnPlayerWeaponChange(playerid, newweapon, oldweapon)
{
    new gunname[25];
    new string[128];
    GetWeaponName(newweapon, gunname);//Make it yourself
    format(string, sizeof(string), "* %s takes his bag of his back and takes out a %s.", GetPlayerName(playerid), gunname);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
Yup Thanks, Thats the one.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)