#1

Guys i want to change this cmd strcmp to zcmd

PHP код:
SendClientMessage(playeridCOLOR_GRAD2"USAGE: (/ad)vertise [advert text]"); 
                return 
1
            } 
            if ((!
adds) && (PlayerInfo[playerid][pAdmin] < 1)) 
            { 
                
format(stringsizeof(string), "   Please try again later %d seconds between Advertisements !",  (addtimer/1000)); 
                
SendClientMessage(playeridCOLOR_GRAD2string); 
                return 
1
            } 
            new 
payout idx 25
            if(
GetPlayerMoney(playerid) < payout
            { 
                
format(stringsizeof(string), "* You used %d characters which cost $%d, you don't have enough."offsetpayout); 
                
SendClientMessage(playeridCOLOR_LIGHTBLUEstring); 
                return 
1
            } 
            
GivePlayerMoney(playerid, - payout); 
            
format(stringsizeof(string), "Advertisement: %s, Contact: %s Ph: %d",  resultsendername,PlayerInfo[playerid][pPnumber]); 
            
OOCNews(COLOR_GREEN,string); 
            
format(stringsizeof(string), "~r~Paid $%d~n~~w~Message contained: %d Characters"payoutidx); 
            
GameTextForPlayer(playeridstring50005); 
            if (
PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn"addtimer0);adds 0;} 
        } 
        return 
1
    } 
i made this but i have a lot of errors and idk how to solve it cuz im new in this lenguage...

PHP код:
CMD:advertise(playeridparams[])
{
    new 
string[128], name[MAX_PLAYER_NAME+1];
    if(
sscanf(params"s[128]"params)) return SendClientMessage(playeridCOLOR_CORRECTION"USAGE: (/ad)vertise [Advert Text]");
    if(
PlayerInfo[playerid][pAdmin] < 1)
    {
        if(
PlayerInfo[playerid][pLevel] <= 1) return SendClientMessage(playeridCOLOR_CORRECTION"You must be level 2 to place an advertise!");
        if(
ServerAdvert gettime())
        {
            
format(stringsizeof(string), "You must wait %d to put another ad"ServerAdvert gettime());
            return 
SendClientMessage(playerid, -1string);
        }
        else
        {
            
GetPlayerName(playeridnamesizeof(name));
            
ServerAdvert gettime()+120;// 120 seconds
            
format(stringsizeof(string), "Advertisement: %s Contact: %s Ph: %d"paramsnamePlayerInfo[playerid][Phone]);
            
SendClientMessageToAll(COLOR_ADVERTISEstring);
            
GivePlayerMoney(playerid, -1000);
        }
    }
    else
    {
       
GetPlayerName(playeridnamesizeof(name));
       
ServerAdvert gettime()+120;// 120 seconds
       
format(stringsizeof(string), "Advertisement: %s Contact: %s Ph: %d"paramsnamePlayerInfo[playerid][Phone]);
       
SendClientMessageToAll(COLOR_ADVERTISEstring);
       
GivePlayerMoney(playerid, -1000);
    }
    return 
1;

can you help me pls

errors:

Код:
C:\Users\Jaua\Downloads\Nuevo\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(430) : warning 201: redefinition of constant/macro (symbol "isnull(%1)")
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(181) : warning 217: loose indentation
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(182) : warning 217: loose indentation
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(183) : warning 217: loose indentation
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(184) : warning 217: loose indentation
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(244) : warning 217: loose indentation
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(245) : warning 217: loose indentation
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(604) : error 017: undefined symbol "pLevel"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(605) : error 017: undefined symbol "ServerAdvert"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(607) : error 017: undefined symbol "ServerAdvert"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(613) : error 017: undefined symbol "ServerAdvert"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(613) : warning 215: expression has no effect
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(614) : error 017: undefined symbol "Phone"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(622) : error 017: undefined symbol "ServerAdvert"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(622) : warning 215: expression has no effect
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(623) : error 017: undefined symbol "Phone"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins0"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins1"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins2"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins3"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins4"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins5"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins6"
C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins7"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Reply


Messages In This Thread
/ad - by Jaua10 - 16.04.2018, 05:41
Re: /ad - by TitoRayne - 16.04.2018, 09:01
Re: /ad - by ProScripter - 16.04.2018, 09:45

Forum Jump:


Users browsing this thread: 1 Guest(s)