Problem With This...
#1

When I Try To Enter The DrugCPFinish it keeps sending me the messages that is on the DrugCP,What is the problem in this please?

pawn Код:
if(checkpointid == DrugCP)
    if(DrugDeliveryStart[playerid] == 0)
    {
       SendClientMessage(playerid, COLOR_RED, "You Are Not In A Drug Delivery Mission!");
    }
    else
    {
       new pID_name[MAX_PLAYER_NAME],Message[128];
       DestroyDynamicCP(DrugCP);
       SendClientMessage(playerid, 0xF79000FF, "You Have Now Took The Drugs,You Will Need To Go To The Car Icon On The Radar And You Will See The Checkpoint Go To It To Deliver The Drugs And Win 10K Money And 10 Scores.");
       SendClientMessage(playerid, COLOR_RED, "Warning: Players Will Come And Kill You Fast For 10K And 10 Scores Because You Are Delivering The Drugs.");
       RemovePlayerMapIcon( playerid, 0 );
       SetPlayerMapIcon(playerid, 1, 2351.8901,-1169.9969,28.0422, 55, 0, MAPICON_GLOBAL );
       DrugCPFinish = CreateDynamicCP(2351.8901,-1169.9969,28.0422, 2, -1, -1, -1, 100);
       GetPlayerName(playerid, pID_name, MAX_PLAYER_NAME);
       format(Message, sizeof(Message), "%s (%i) Has The Drugs! Kill Him To Get 10K Money And 10 Scores!",pID_name,playerid), SendClientMessageToAll(0xEFF700FF, Message);
       DrugsTaken[playerid] = 1;
       DrugsGetting[playerid] = 0;
    }
    else if(checkpointid == DrugCPFinish)
    if(DrugDeliveryStart[playerid] == 0)
    {
       SendClientMessage(playerid, COLOR_RED, "You Are Not In A Drug Delivery Mission!");
    }
    else
    {
       new pID_name[MAX_PLAYER_NAME],Message[128];
       DestroyDynamicCP(DrugCPFinish);
       SendClientMessage(playerid, 0xF79000FF, "Congratulations! You Have Delivered The Drugs! You Have Got 10K Money And 10 Scores!");
       SendClientMessage(playerid, 0xF79000FF, "Come Back If You Want More Money.");
       RemovePlayerMapIcon( playerid, 1 );
       GetPlayerName(playerid, pID_name, MAX_PLAYER_NAME);
       format(Message, sizeof(Message), "%s (%i) Has Delivered The Drugs! If You Killed Him You Won't Get The 10K Money And 10 Scores.",pID_name,playerid), SendClientMessageToAll(0xEFF700FF, Message);
       GameTextForPlayer(playerid, "Mission Completed", 5000, 5);
       DrugsTaken[playerid] = 0;
       DrugDeliveryStart[playerid] = 0;
    }
    return 1;
}
Reply
#2

anyone here?
Reply
#3

please you will get rep,please help me
Reply
#4

Not sure but, try this.

pawn Код:
if(checkpointid == DrugCP)
{
    if(DrugDeliveryStart[playerid] == 0)
    {
       SendClientMessage(playerid, COLOR_RED, "You Are Not In A Drug Delivery Mission!");
    }
    else
    {
       new pID_name[MAX_PLAYER_NAME],Message[128];
       DestroyDynamicCP(DrugCP);
       SendClientMessage(playerid, 0xF79000FF, "You Have Now Took The Drugs,You Will Need To Go To The Car Icon On The Radar And You Will See The Checkpoint Go To It To Deliver The Drugs And Win 10K Money And 10 Scores.");
       SendClientMessage(playerid, COLOR_RED, "Warning: Players Will Come And Kill You Fast For 10K And 10 Scores Because You Are Delivering The Drugs.");
       RemovePlayerMapIcon( playerid, 0 );
       SetPlayerMapIcon(playerid, 1, 2351.8901,-1169.9969,28.0422, 55, 0, MAPICON_GLOBAL );
       DrugCPFinish = CreateDynamicCP(2351.8901,-1169.9969,28.0422, 2, -1, -1, -1, 100);
       GetPlayerName(playerid, pID_name, MAX_PLAYER_NAME);
       format(Message, sizeof(Message), "%s (%i) Has The Drugs! Kill Him To Get 10K Money And 10 Scores!",pID_name,playerid), SendClientMessageToAll(0xEFF700FF, Message);
       DrugsTaken[playerid] = 1;
       DrugsGetting[playerid] = 0;
    }
    return 1;
}

if(checkpointid == DrugCPFinish)
{
    if(DrugDeliveryStart[playerid] == 0)
    {
       SendClientMessage(playerid, COLOR_RED, "You Are Not In A Drug Delivery Mission!");
    }
    else
    {
       new pID_name[MAX_PLAYER_NAME],Message[128];
       DestroyDynamicCP(DrugCPFinish);
       SendClientMessage(playerid, 0xF79000FF, "Congratulations! You Have Delivered The Drugs! You Have Got 10K Money And 10 Scores!");
       SendClientMessage(playerid, 0xF79000FF, "Come Back If You Want More Money.");
       RemovePlayerMapIcon( playerid, 1 );
       GetPlayerName(playerid, pID_name, MAX_PLAYER_NAME);
       format(Message, sizeof(Message), "%s (%i) Has Delivered The Drugs! If You Killed Him You Won't Get The 10K Money And 10 Scores.",pID_name,playerid), SendClientMessageToAll(0xEFF700FF, Message);
       GameTextForPlayer(playerid, "Mission Completed", 5000, 5);
       DrugsTaken[playerid] = 0;
       DrugDeliveryStart[playerid] = 0;
    }
    return 1;
}
Reply
#5

Sending what message? I can't seem to understand what you're saying??
Reply
#6

when i enter the Checkpoint Drug CP Finish it sends me the messages that is under the Drug CP
Reply
#7

You were using 'else if' so try what Hostskool posted above
Reply
#8

again,it gives me alot of messages of the DrugCP when i stand on the DrugCPFinish
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)