Pickup
#1

look im going to try to be clear i have 2 pickups! when im in game if i pickup any of thos 2 pickups it sends this

%s as passed the parkour mission and got 50000$
%s as found a briefcase and got 50000$ + deagle

so when someone passes the parkour mission i have is sends
%s as passed the parkour mission and got 50000$
%s as found a briefcase and got 50000$ + deagle
but i only want it to send
%s as passed the parkour mission and got 50000$
when someone finds a briefcase it sends
%s as passed the parkour mission and got 50000$
%s as found a briefcase and got 50000$ + deagle
i only want it to send as passed parkour mission

so my code is in the same filterscript:
Код:
new name[MAX_PLAYER_NAME], string[44];
    GetPlayerName(playerid, name, sizeof(name));
    if(pickupid == cash)
	GivePlayerMoney(playerid,500000);
	format(string, sizeof(string), "%s has completed the parkour mission",name);
	SendClientMessageToAll(COLOR_RED, string);
	SendClientMessageToAll(COLOR_RED, "and received 50000$");
    if(pickupid == brief);
	GivePlayerMoney(playerid,500000);
	format(string, sizeof(string), "%s has found a briefcase",name);
	SendClientMessageToAll(COLOR_RED, string);
	SendClientMessageToAll(COLOR_RED, "and received 50000$ + deagle");
    return 1;
}
Reply
#2

pawn Код:
new name[MAX_PLAYER_NAME], string[44];
GetPlayerName(playerid, name, sizeof(name));
if(pickupid == cash)
{
    GivePlayerMoney(playerid,500000);
    format(string, sizeof(string), "%s has completed the parkour mission",name);
    SendClientMessageToAll(COLOR_RED, string);
    SendClientMessageToAll(COLOR_RED, "and received 50000$");
}
if(pickupid == brief);
{
    GivePlayerMoney(playerid,500000);
    format(string, sizeof(string), "%s has found a briefcase",name);
    SendClientMessageToAll(COLOR_RED, string);
    SendClientMessageToAll(COLOR_RED, "and received 50000$ + deagle");
}
Reply
#3

Код:
C:\Users\james\Desktop\servimm\filterscripts\pickup.pwn(160) : error 036: empty statement
Код:
if(pickupid == brief);//error line
{
    GivePlayerMoney(playerid,500000);
Reply
#4

ok sorry for double post but now defenetly fixed xD thanks for some help i just needed to take ; of
Reply
#5

Код:
new name[MAX_PLAYER_NAME], string[44];
	GetPlayerName(playerid, name, sizeof(name));
	if(pickupid == cash)
	{
    	GivePlayerMoney(playerid,500000);
    	format(string, sizeof(string), "%s has completed the parkour mission",name);
    	SendClientMessageToAll(COLOR_RED, string);
    	SendClientMessageToAll(COLOR_RED, "and received 50000$");
	}
	if(pickupid == brief)
	{
    	GivePlayerMoney(playerid,500000);
    	format(string, sizeof(string), "%s has found a briefcase",name);
    	SendClientMessageToAll(COLOR_RED, string);
    	SendClientMessageToAll(COLOR_RED, "and received 50000$ + deagle");
	}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)