Command Activated Pickups HELP?
#1

I need to learn how to make a pickup thats only activated if you give a command when on it. Could anyone give me an example?
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("//Command Here\\", cmdtext, true, 10) == 0) {
        new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
        GetPlayerName(playerid, pname, sizeof(pname));
        format(string, sizeof(string), "%s Has picked up <<Item>>", pname);
        if(IsPlayerInRangeOfPoint(playerid, 1.0,Pickup Cords))
        {
            SendClientMessageToAll(0xAAAAAAAA, string);
            return 1;
        }
        else SendClientMessage(playerid, 0x32E712FF, "Sorry your not in range of a pickup");
    }
    return 0;
}
Try this script
Reply
#3

Thanks very much. I also want it to only be available to one team. Meaning the pickup wont work for other team.
Reply
#4

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 1.0,Pickup Cords) && gTeam[playerid] == TEAM_YOU_WANT)
        {
            SendClientMessageToAll(0xAAAAAAAA, string);
            return 1;
        }
else SendClientMessage(playerid, 0x32E712FF, "Sorry your not in range of a pickup | team");
Reply
#5

if u have problems to make a pickups this is tutorial to make a Pickups : https://sampforum.blast.hk/showthread.php?tid=327953
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)