[HELP] Menu Selection
#1

Hello.
I found this tutorial https://sampforum.blast.hk/showthread.php?tid=188310 and i fallow all like on tut.but i get problem with that becose when i enter in checkpoint textdraw dont appear i dont know why.

Thanks
Reply
#2

Did you put TextDrawShowForPlayer?
Reply
#3

Quote:
Originally Posted by The_Moddler
Посмотреть сообщение
Did you put TextDrawShowForPlayer?
Yes mate i used TextDrawShowForPlayer here is code.
Код:
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
            if(checkpointid == Checkpoint1) // This is what the checkpoint will do
            {
                TextDrawShowForPlayer(playerid, TextDrawOr[playerid]); // Funtion, in this case the checkpoint only will show the TextDraw
            }
     {
Reply
#4

Is it in a callback :

pawn Код:
public OnPlayerEnterCheckpoint(...)
{
  return 1;
}
Reply
#5

Quote:
Originally Posted by ViruZZzZ_ChiLLL
Посмотреть сообщение
Is it in a callback :

pawn Код:
public OnPlayerEnterCheckpoint(...)
{
  return 1;
}
yes mate iats on OnPlayerEnterDynamicCP,and i dont know why textdraw dont appear :S
Reply
#6

Show us the entire code please, also, make sure that you are on the right CP.
Reply
#7

Here is mate mine script i really dont know what is problem :S


Код:
new:Checkpoint1;

 TextDrawOr[playerid]= TextDrawCreate(15.000000, 170.000000, "~n~~r~Oruzja:~n~~n~~y~1.~w~|Ak-47 ~g~$3500|~n~~y~2.~w~|Desert ~g~$800|~n~~y~3.~w~|Sawnoff ~g~$2600|~n~~y~4.~w~|Combat ~g~$3600|~n~~y~5.~w~|Tec9 ~g~$1900|~n~~y~6.~w~|MP5 ~g~$900|~n~~y~7.~w~|M4 ~g~$3500|~n~~y~8.~w~|Sniper ~g~$4200|~n~~y~9.~w~|Pancirf ~g~$1000|~n~");
   TextDrawFont(TextDrawOr[playerid], 1);
   TextDrawTextSize(TextDrawOr[playerid],145.000000, 260.000000);
   TextDrawLetterSize(TextDrawOr[playerid],0.299999,0.800000);
   TextDrawFont(TextDrawOr[playerid],1);
   TextDrawUseBox(TextDrawOr[playerid], 1);
   TextDrawBoxColor(TextDrawOr[playerid], 0x000000FF);

On Cellback
OnPlayerEnterDynamicCP
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
            if(checkpointid == Checkpoint1) // This is what the checkpoint will do
            {
                TextDrawShowForPlayer(playerid, TextDrawOr[playerid]); // Funtion, in this case the checkpoint only will show the TextDraw
            }
     {


Cellback
OnPlayerText
 if(text[0] == '1') // Chainsaw
    if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint
    {
        if(GetPlayerMoney(playerid) <3500) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money"
        SafeGivePlayerMoney(playerid,-3500); // The Weapon Cost
        SafeGivePlayerWeapon(playerid,30,200);
    return 0;
    }
    if(text[0] == '2') //Desert Eagle
    if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint
    {
        if(GetPlayerMoney(playerid) <800) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money"
        SafeGivePlayerMoney(playerid,-800); // The Weapon Cost
        SafeGivePlayerWeapon(playerid,24,150);
    return 0;
    }
    if(text[0] == '3') //Sawnoff Shotgun
    if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint
    {
        if(GetPlayerMoney(playerid) <2600) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money"
        SafeGivePlayerMoney(playerid,-2600); // The Weapon Cost
        SafeGivePlayerWeapon(playerid,26,150);
    return 0;
    }
    if(text[0] == '4') //Combat Shotgun
    if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint
    {
        if(GetPlayerMoney(playerid) <3600) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money"
        SafeGivePlayerMoney(playerid,-3600); // The Weapon Cost
        SafeGivePlayerWeapon(playerid,27,150);
    return 0;
    }
    if(text[0] == '5') //Tec9
    if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint
    {
        if(GetPlayerMoney(playerid) <1900) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money"
        SafeGivePlayerMoney(playerid,-1900); // The Weapon Cost
        SafeGivePlayerWeapon(playerid,32,200);
    return 0;
    }
    if(text[0] == '6') //MP5
    if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint
    {
        if(GetPlayerMoney(playerid) <900) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money"
        SafeGivePlayerMoney(playerid,-900); // The Weapon Cost
        SafeGivePlayerWeapon(playerid,29,200);
    return 0;
    }
    if(text[0] == '7') //M4
    if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint
    {
        if(GetPlayerMoney(playerid) <3500) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money"
        SafeGivePlayerMoney(playerid,-3500); // The Weapon Cost
        SafeGivePlayerWeapon(playerid,31,250);
    return 0;
    }
    if(text[0] == '8') //Sniper
    if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint
    {
        if(GetPlayerMoney(playerid) <4200) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money"
        SafeGivePlayerMoney(playerid,-4200); // The Weapon Cost
        SafeGivePlayerWeapon(playerid,34,100);
    return 0;
    }
    if(text[0] == '9') //Armor
    if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint
    {
        if(GetPlayerMoney(playerid) <1000) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money"
        SafeGivePlayerMoney(playerid,-1000); // The Weapon Cost
        SetPlayerArmour(playerid,100);
    return 0;
    }
Please can someone help me ?
Reply
#8

please can someone help me ? :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)