need help with command buy
#1

if player type command /buy
this code
GivePlayerMoney(playerid,-6000):
if player don't have money join in command to how i repair this and send message if he don't have money
Reply
#2

pawn Код:
if(!strcmp(cmdtext, "/buy", true))
{
    if(GetPlayerMoney(playerid) >= 6000)
    {
        GivePlayerMoney(playerid,-6000);
        ///And all other things you want the command to do.
    }
    else return SendClientMessage(playerid,color,"You don't have enough money!");
    return 1;
}
Reply
#3

error 001: expected token: ";", but found "}"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

pawn Код:
if(!strcmp(cmdtext, "/buy", true))
{
    if(GetPlayerMoney(playerid) >= 6000)
    {
        GivePlayerMoney(playerid,-6000);
        ///And all other things you want the command to do.
    }
    else return SendClientMessage(playerid,color,"You don't have enough money!");
    return 1;
}
Reply
#5

thanks thanks
Reply
#6

ok in 1 time used command i need repair and flip commands to use one time in 15 min
Reply
#7

pawn Код:
if(strcmp("/example", cmdtext, true, 8) == 0)
{
 if(GetPVarInt(playerid,"CMDABUSE1")>GetTickCount())return SendClientMessage(playerid,Red,"ERROR : You must wait before using this command again!");
 SetPVarInt(playerid,"CMDABUSE1",GetTickCount()+60000*15);
 return 1;
}
Hope you get what I mean.
Reply
#8

error 017: undefined symbol "GetPVarInt"
error 017: undefined symbol "SetPVarInt"
Reply
#9

Quote:
Originally Posted by omarhassan
Посмотреть сообщение
error 017: undefined symbol "GetPVarInt"
error 017: undefined symbol "SetPVarInt"
Are you using the new 0.3 includes?
Reply
#10

yes i use samp 0.3 and files of samp server 0.3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)