Originally Posted by Danikov
i did the following script:
public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid==Cash)GivePlayerMoney(playerid,5); SendClientMessage(playerid, COLOR_GREEN,"You Found 5 Bucks"); if(pickupid==Cash1)GivePlayerMoney(playerid,7); SendClientMessage(playerid, COLOR_GREEN,"You Found 7 Bucks"); if(pickupid==Cash2)GivePlayerMoney(playerid,; SendClientMessage(playerid, COLOR_GREEN,"You Found 8 Bucks"); if(pickupid==Cash3)GivePlayerMoney(playerid,9); SendClientMessage(playerid, COLOR_GREEN,"You Found 9 Bucks"); if(pickupid==Cash4)GivePlayerMoney(playerid,5); SendClientMessage(playerid, COLOR_GREEN,"You Found 5 Bucks"); if(pickupid==BriefCase)GivePlayerMoney(playerid,50 0); SendClientMessage(playerid, COLOR_GREEN,"You Found A Briefcase which has 500$ Inside"); return 1; } and i have a problem,once i take one of the pickups,i get all these message at once,can anyone help me?i want to get these messages appear correctly like once i take 5 bucks i get a message:"You Found 5 Bucks" and not all these at once. |
Originally Posted by Danikov
i did the following script:
public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid==Cash)GivePlayerMoney(playerid,5); SendClientMessage(playerid, COLOR_GREEN,"You Found 5 Bucks"); if(pickupid==Cash1)GivePlayerMoney(playerid,7); SendClientMessage(playerid, COLOR_GREEN,"You Found 7 Bucks"); if(pickupid==Cash2)GivePlayerMoney(playerid,; SendClientMessage(playerid, COLOR_GREEN,"You Found 8 Bucks"); if(pickupid==Cash3)GivePlayerMoney(playerid,9); SendClientMessage(playerid, COLOR_GREEN,"You Found 9 Bucks"); if(pickupid==Cash4)GivePlayerMoney(playerid,5); SendClientMessage(playerid, COLOR_GREEN,"You Found 5 Bucks"); if(pickupid==BriefCase)GivePlayerMoney(playerid,50 0); SendClientMessage(playerid, COLOR_GREEN,"You Found A Briefcase which has 500$ Inside"); return 1; } and i have a problem,once i take one of the pickups,i get all these message at once,can anyone help me?i want to get these messages appear correctly like once i take 5 bucks i get a message:"You Found 5 Bucks" and not all these at once. |
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid==Cash)
{
GivePlayerMoney(playerid,5);
SendClientMessage(playerid, COLOR_GREEN,"You Found 5 Bucks");
} // these are brackets they define what hapends if the if is true
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid==Cash){ GivePlayerMoney(playerid,5); SendClientMessage(playerid, COLOR_GREEN,"You Found 5 Bucks"); } if(pickupid==Cash1){ GivePlayerMoney(playerid,7); SendClientMessage(playerid, COLOR_GREEN,"You Found 7 Bucks"); } if(pickupid==Cash2){ GivePlayerMoney(playerid,8); SendClientMessage(playerid, COLOR_GREEN,"You Found 8 Bucks"); } if(pickupid==Cash3){ GivePlayerMoney(playerid,9); SendClientMessage(playerid, COLOR_GREEN,"You Found 9 Bucks"); } if(pickupid==Cash4){ GivePlayerMoney(playerid,5); SendClientMessage(playerid, COLOR_GREEN,"You Found 5 Bucks"); } if(pickupid==BriefCase){ GivePlayerMoney(playerid,500); SendClientMessage(playerid, COLOR_GREEN,"You Found A Briefcase which has 500$ Inside"); } return 1; }
Originally Posted by Danikov
Damnit still nothing and this time i get errors,can someone make me a Bracketful script like this?
I'd realy appreciate that |