Command Activated Pickups HELP? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command Activated Pickups HELP? (
/showthread.php?tid=359103)
Command Activated Pickups HELP? -
ShawtyyMacJunior - 12.07.2012
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?
Re: Command Activated Pickups HELP? -
zT KiNgKoNg - 13.07.2012
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
Re: Command Activated Pickups HELP? -
ShawtyyMacJunior - 13.07.2012
Thanks very much. I also want it to only be available to one team. Meaning the pickup wont work for other team.
Re: Command Activated Pickups HELP? -
[MM]RoXoR[FS] - 13.07.2012
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");
Re: Command Activated Pickups HELP? -
Devilxz97 - 13.07.2012
if u have problems to make a pickups this is tutorial to make a Pickups :
https://sampforum.blast.hk/showthread.php?tid=327953