Relic - 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: Relic (
/showthread.php?tid=447026)
Relic -
Configuration - 28.06.2013
Hello, if player pick pickup example id 1276 and if kill player Get $1000 and if he death relic removed and if he dont have relic and kill player get $500 who can make this ?
Thanks for your time.
Re: Relic -
doreto - 28.06.2013
Re : Relic -
Naruto_Emilio - 28.06.2013
pawn Код:
#include <a_samp>
new Pickup;
new HasPickup[MAX_PLAYERS];
public OnGameModeInit()
{
Pickup = CreatePickup(....);
return 1;
}
public OnPlayerPickupPickup(playerid, pickupid)
{
if(pickupid == Pickup)
{
HasPickup[playerid] = 1;
SendClientMessage(playerid, -1, "..You got a Relic");
}
return 1;
}
public OnPlayerConnect(playerid)
{
HasPickup[playerid] = 0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(HasPickup[killerid] == 1)
{
GivePlayerMoney(killerid, 1000);
SendClientMessage(killerid, -1, "You killed a person and got 1000$ because you own a relic");
Return 0;
}
else if(HasPickup[killerid] == 0)
{
SendClientMessage(killerid, -1, "You killed a person and got 5000$ because you don't own a relic");
GivePlayerMoney(killerid, 500);
return 0;
}
if(HasPickup[playerid] == 1)
{
HasPickup[playerid] = 0;
SendClientMessage(playerid, -1, "You've been killed you lost your relic");
return 0;
}
if(HasPickup[playerid] == 0)
{
SendClientMessage(killerid, -1, "You've been killed");
return 0;
}
return 1;
}
Re: Relic -
Don_Cage - 28.06.2013
I didn't understand a word now.. Please explain abit better?
Re : Relic -
Naruto_Emilio - 28.06.2013
Just change this CreatePickup(model, type, Float:X, Float:Y, Float:Z, Virtualworld);
to the pickup and location you want I coded everything for you.
Re: Relic -
Configuration - 28.06.2013
Thanks so much man