Chat spammed -
Gooday - 29.12.2011
Hi, when i enter the checpoints (I have info checpoints, when u enter u got a message) and when i enter one i see a both of all the checkpoints messages
please help....
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == news)
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_LIGHTGREEN,"KAUFMAN CAB RECRUIMENT OFFICE");
SendClientMessage(playerid, COLOR_GREY,"We are hiring new drivers! Type /TaxiJob for become a Kaufman's driver and start your work!");
SendClientMessage(playerid, COLOR_GREY,"Use /R [Message] for comunicate with the other drivers. At every call you will see a message on your laptop.");
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
if(pickupid == pw)
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_LIGHTGREEN,"BONE COUNTY PUBLIC WORKS RECRUIMENT OFFICE");
SendClientMessage(playerid, COLOR_GREY,"We are hiring new workers! Type /PublicWorks for become a Public Worker and start your job!");
SendClientMessage(playerid, COLOR_GREY,"Use /R [Message] for comunicate with the other workers.");
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
if(pickupid == taxi)
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_LIGHTGREEN,"SAN ANDREAS NETWORK RECRUIMENT OFFICE");
SendClientMessage(playerid, COLOR_GREY,"We are hiring new reporters! Type /SannJob for become a Reporter and start your Journalistc Career!");
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
return 1;
}
Re: Chat spammed -
Vince - 29.12.2011
Does that even compile? You need to use compound statements (i.e. curly brackets).
Re: Chat spammed -
Gooday - 29.12.2011
i GOT NO wars when compile...please post a example....
Re: Chat spammed -
seanny - 29.12.2011
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == news)
{
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_LIGHTGREEN,"KAUFMAN CAB RECRUIMENT OFFICE");
SendClientMessage(playerid, COLOR_GREY,"We are hiring new drivers! Type /TaxiJob for become a Kaufman's driver and start your work!");
SendClientMessage(playerid, COLOR_GREY,"Use /R [Message] for comunicate with the other drivers. At every call you will see a message on your laptop.");
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
}
else if(pickupid == pw)
{
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_LIGHTGREEN,"BONE COUNTY PUBLIC WORKS RECRUIMENT OFFICE");
SendClientMessage(playerid, COLOR_GREY,"We are hiring new workers! Type /PublicWorks for become a Public Worker and start your job!");
SendClientMessage(playerid, COLOR_GREY,"Use /R [Message] for comunicate with the other workers.");
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
}
else if(pickupid == taxi)
{
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_LIGHTGREEN,"SAN ANDREAS NETWORK RECRUIMENT OFFICE");
SendClientMessage(playerid, COLOR_GREY,"We are hiring new reporters! Type /SannJob for become a Reporter and start your Journalistc Career!");
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
}
return 1;
Re: Chat spammed -
Luis- - 29.12.2011
How does that give no errors.
Re: Chat spammed -
PowerPC603 - 29.12.2011
Try this:
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
switch(pickupid)
{
case news:
{
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_LIGHTGREEN,"KAUFMAN CAB RECRUIMENT OFFICE");
SendClientMessage(playerid, COLOR_GREY,"We are hiring new drivers! Type /TaxiJob for become a Kaufman's driver and start your work!");
SendClientMessage(playerid, COLOR_GREY,"Use /R [Message] for comunicate with the other drivers. At every call you will see a message on your laptop.");
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
}
case pw:
{
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_LIGHTGREEN,"BONE COUNTY PUBLIC WORKS RECRUIMENT OFFICE");
SendClientMessage(playerid, COLOR_GREY,"We are hiring new workers! Type /PublicWorks for become a Public Worker and start your job!");
SendClientMessage(playerid, COLOR_GREY,"Use /R [Message] for comunicate with the other workers.");
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
}
case taxi:
{
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_LIGHTGREEN,"SAN ANDREAS NETWORK RECRUIMENT OFFICE");
SendClientMessage(playerid, COLOR_GREY,"We are hiring new reporters! Type /SannJob for become a Reporter and start your Journalistc Career!");
SendClientMessage(playerid, COLOR_GREY,"-------------------------------------------------------------------------------------------------");
}
}
return 1;
}
Re: Chat spammed -
Norck - 29.12.2011
Quote:
Originally Posted by -Luis
How does that give no errors.
|
Because braces are not necessary for a single instruction.