Two problems
#1

First here is the first code
PHP код:
else if(pickupid == mafia || pickupid == bikers || pickupid == grove || pickupid == ballas || pickupid == rifas || pickupid == tirads)
{
    if(
PlayerInfo[playerid][pGang] > 0)
    {
    
SendClientMessage(playeridCOLOR_RED"You are already belong to a gang");
    }
    else
    {
    
TextDrawShowForPlayer(playeridText:Textdraw0);
    
TextDrawShowForPlayer(playeridText:Textdraw1);
    }

it work but it send fo me the client message and doesn't stop sending it


the other problem as you saw up when the player enter pickup it show to him a text draw
and the other code
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
 if (
newkeys KEY_WALK)
 {
    if(
IsPlayerInRangeOfPoint(playerid22176.2573,1663.2335,10.8203))
    {
    if(
PlayerInfo[playerid][pGang] == 0)
    {
    
SendClientMessage(playeridCOLOR_BLUE"Now, You are part from Mafia Gang");
    
PlayerInfo[playerid][pGang] = 1;
    
TextDrawHideForPlayer(playeridText:Textdraw0);
    
TextDrawHideForPlayer(playeridText:Textdraw1);
    }
    else
    {
    
SendClientMessage(playeridCOLOR_RED"You are already belong to a gang");
    }
 }
}
return 
1;

But when i click lalt i make me from the gang and send for me a message but doesn't hide the text draw.
Please help !
Reply
#2

Please help
Reply
#3

Try:
pawn Код:
if((newkeys & KEY_WALK) && !(oldkeys & KEY_WALK))
Reply
#4

Nothing !
Reply
#5

use this..

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
 if (newkeys & KEY_FIRE)
 {
    if(IsPlayerInRangeOfPoint(playerid, 2, 2176.2573,1663.2335,10.8203))
    {
    if(PlayerInfo[playerid][pGang] == 0)
    {
    SendClientMessage(playerid, COLOR_BLUE, "Now, You are part from Mafia Gang");
    PlayerInfo[playerid][pGang] = 1;
    TextDrawHideForPlayer(playerid, Textdraw0);
    TextDrawHideForPlayer(playerid, Textdraw1);
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, "You are already belong to a gang");
    }
 }
}
return 1;
}
Reply
#6

Hello,

First of all, your first code seems to be a bit corrupt. If it is called upon "OnPlayerPickUpPickup", that will most likely cause the server repeatedly call your function as person will just keep on picking up the pickup. I'd suggest you to remove it from OnPlayerPickUpPickup if it is so.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)