new Pickup1;
new Pickup2;
#include <a_samp>
public OnFilterScriptInit()
{
Pickup1 = CreatePickup(model,type,x,y,z,-1); // A-pickup
Pickup2 = CreatePickup(model,type,x,y,z,-1); //B-Pickup
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, \"/fegyver\", true))
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z)) //A-pickup kordinátái
{
SendClientMessage(playerid,-1,\"Kaptál egy M4-est!\");
GivePlayerWeapon(31,5000);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z)) //B-pickup kordinátái
{
SendClientMessage(playerid,-1,\"Kaptál egy AK47-est!\");
GivePlayerWeapon(30,5000);
}
else
{
SendClientMessage(playerid,-1,\"Nem vagy semelyik pickup közelében!\");
}
return 1;
}
return 0;
}