Commands change YCMD to strcmp HELP
#1

PHP код:
YCMD:createbiz(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SCM(playeridCOLOR_GREY"You aren't authorized to use this command!");//Checks if player is a RCON admin..Change this with your admin system.
    
new pricelevelidintworldstring[128], Float:XiFloat:YiFloat:Ziinti;//All the new defines we will need.
    
if(sscanf(params"dddfff"pricelevelintiXiYiZi)) return SendClientMessage(playeridCOLOR_GREY"YCMD: /createbiz [price] [type] [interior] [X] [Y] [Z]");//d stands for integer, f stands for float.
    
if(level || level 4) return SendClientMessage(playeridCOLOR_GREY"YCMD: Type cannot go below 0, or above 10.");//
    
if(price 10000) return SendClientMessage(playeridCOLOR_GREY"YCMD: Price cannot go below $10,000.");// Check if the price is below 1000, if it is it will return a message saying it.
    
for(new 1;sizeof(BusinessInfo);h++)//Loops through all the businesses
    
{
        if(
BusinessInfo[h][bPrice] == 0)//Checks if the price of a business is 0.
        
{
            
id h;
            break;
//It stops looping if it is.
        
}
    }
    new 
Float:X,Float:Y,Float:Z,Float:A;//More new defines.
    
GetPlayerPos(playeridXYZ);//Gets your player position, and saves it into floats.
    
GetPlayerFacingAngle(playeridA);//Gets your facing angle, and saves it into a float.
    
int GetPlayerInterior(playerid);//Gets your interior, and saves it into a integer.
    
world GetPlayerVirtualWorld(playerid);//Gets your Virtual World, and saves it into a integer
    
BusinessInfo[id][bInsideInt] = inti;
    
BusinessInfo[id][bExitX] = Xi;
    
BusinessInfo[id][bExitY] = Yi;
    
BusinessInfo[id][bExitZ] = Zi;
   
    
BusinessInfo[id][bOwned] = 0;
    
BusinessInfo[id][bPrice] = price;
    
BusinessInfo[id][bType] = level;
    
BusinessInfo[id][bEntranceX] = X;
    
BusinessInfo[id][bEntranceY] = Y;
    
BusinessInfo[id][bEntranceZ] = Z;
    
BusinessInfo[id][bEntranceA] = A;
    
BusinessInfo[id][bLocked] = 1;
    
BusinessInfo[id][bInt] =int;
    
BusinessInfo[id][bWorld] =world;
    
BusinessInfo[id][bInsideWorld] =id;
   
    
format(stringsizeof(string), "None");
    
strmid(BusinessInfo[id][bName], string0strlen(string), 255);
   
    if(
BusinessInfo[id][bOutsideIcon]) DestroyDynamicPickup(BusinessInfo[id][bOutsideIcon]);
    if(
BusinessInfo[id][bInsideIcon]) DestroyDynamicPickup(BusinessInfo[id][bInsideIcon]);
    
BusinessInfo[id][bOutsideIcon] = CreateDynamicPickup(12721BusinessInfo[id][bEntranceX], BusinessInfo[id][bEntranceY], BusinessInfo[id][bEntranceZ], BusinessInfo[id][bWorld]);//Creates a pickup at your location
    
BusinessInfo[id][bInsideIcon] = CreateDynamicPickup(12721BusinessInfo[id][bExitX], BusinessInfo[id][bExitY], BusinessInfo[id][bExitZ], BusinessInfo[id][bInsideWorld]);//Creates a pickup at your location
    
new file4[40];
    
format(file4sizeof(file4), BPATHid);
    new 
INI:File INI_Open(file4);
    
INI_SetTag(File,"data");
    
INI_WriteInt(File,"bOwned"BusinessInfo[id][bOwned]);
    
INI_WriteInt(File,"bPrice"BusinessInfo[id][bPrice]);
    
INI_WriteString(File,"bOwner"BusinessInfo[id][bOwner]);
    
INI_WriteInt(File,"bType"BusinessInfo[id][bType]);
    
INI_WriteInt(File,"bLocked"BusinessInfo[id][bLocked]);
    
INI_WriteInt(File,"bMoney"BusinessInfo[id][bMoney]);
    
INI_WriteFloat(File,"bEntranceX"BusinessInfo[id][bEntranceX]);
    
INI_WriteFloat(File,"bEntranceY"BusinessInfo[id][bEntranceY]);
    
INI_WriteFloat(File,"bEntranceZ"BusinessInfo[id][bEntranceZ]);
    
INI_WriteFloat(File,"bEntranceA"BusinessInfo[id][bEntranceA]);
    
INI_WriteFloat(File,"bExitX"BusinessInfo[id][bExitX]);
    
INI_WriteFloat(File,"bExitY"BusinessInfo[id][bExitY]);
    
INI_WriteFloat(File,"bExitZ"BusinessInfo[id][bExitZ]);
    
INI_WriteFloat(File,"bExitA"BusinessInfo[id][bExitA]);
    
INI_WriteInt(File,"bInt"BusinessInfo[id][bInt]);
    
INI_WriteInt(File,"bWorld"BusinessInfo[id][bWorld]);
    
INI_WriteInt(File,"bInsideInt"BusinessInfo[id][bInsideInt]);
    
INI_WriteInt(File,"bInsideWorld"BusinessInfo[id][bInsideWorld]);
    
INI_WriteString(File,"bName"BusinessInfo[id][bName]);
    
INI_Close(File);
    return 
1;
}
YCMD:deletebiz(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return 1// Checks if a player is a RCON admin, again change this to your admin system.
    
new id;
    if(
sscanf(params"d"id)) return SendClientMessage(playeridCOLOR_GREY"YCMD: /deletebiz [id]");
    if(
BusinessInfo[id][bOwned] == 1) return SCM(playeridCOLOR_GREY"This biz is owned.");//Checks if the biz is owned, if it is it won't allow it to be deleted.
        //Below it resets all the biz enum info.
    
BusinessInfo[id][bOwned] = 0;
    
BusinessInfo[id][bPrice] = 0;
    
BusinessInfo[id][bOwner] = 0;
    
BusinessInfo[id][bType] = 0;
    
BusinessInfo[id][bLocked] = 0;
    
BusinessInfo[id][bName] = 0;
    
BusinessInfo[id][bMoney] = 0;
    
BusinessInfo[id][bEntranceX] = 0;
    
BusinessInfo[id][bEntranceY] = 0;
    
BusinessInfo[id][bEntranceZ] = 0;
    
BusinessInfo[id][bEntranceA] = 0;
    
BusinessInfo[id][bExitX] = 0;
    
BusinessInfo[id][bExitY] = 0;
    
BusinessInfo[id][bExitZ] = 0;
    
BusinessInfo[id][bExitA] = 0;
    
BusinessInfo[id][bInt] = 0;
    
BusinessInfo[id][bWorld] = 0;
    if(
BusinessInfo[id][bOutsideIcon]) DestroyDynamicPickup(BusinessInfo[id][bOutsideIcon]);//Destroys the pickup.
    
new string[128];
    
format(stringsizeof(string), BPATHid);
    
fremove(string);
    return 
1;
}
YCMD:enter(playeridparams[])
{
    for(new 
1sizeof(BusinessInfo); b++)//Loops through all the businesses.
    
{
        if(
IsPlayerInRangeOfPoint(playerid1.0BusinessInfo[b][bEntranceX], BusinessInfo[b][bEntranceY], BusinessInfo[b][bEntranceZ]))//Checks if player is near the entrance.
        
{
            if(
BusinessInfo[b][bLocked] == 1) return SendClientMessage(playeridCOLOR_GREY"This Business is locked!");//Checks it it is locked/
            
SetPlayerPos(playeridBusinessInfo[b][bExitX], BusinessInfo[b][bExitY], BusinessInfo[b][bExitZ]);
            
SetPlayerFacingAngle(playeridBusinessInfo[b][bExitA]);
            
SetPlayerInterior(playeridBusinessInfo[b][bInsideInt]);
            
SetPlayerVirtualWorld(playeridBusinessInfo[b][bInsideWorld]);
            
InsideBiz[playerid] = b;
            return 
1;
        }
        if(
IsPlayerInRangeOfPoint(playerid2.0BusinessInfo[b][bExitX], BusinessInfo[b][bExitY], BusinessInfo[b][bExitZ]) && GetPlayerVirtualWorld(playerid) == BusinessInfo[b][bInsideWorld])//Checks if player is in near the exit.
        
{
            
SetPlayerPos(playeridBusinessInfo[b][bEntranceX], BusinessInfo[b][bEntranceY], BusinessInfo[b][bEntranceZ]);
            
SetPlayerFacingAngle(playeridBusinessInfo[b][bEntranceA]);
            
SetPlayerInterior(playeridBusinessInfo[b][bInt]);
            
SetPlayerVirtualWorld(playeridBusinessInfo[b][bWorld]);
            
InsideBiz[playerid] = 0;
            return 
1;
        }
    }
    return 
1;

Help me please......
Reply
#2

Can you explain what the problem is?
Reply
#3

i include
#include <YSI\y_commands>
#include <YSI\y_ini>
andd send me warnings
PHP код:
D:\Olcay\pawno\include\YSI\y_commands.inc(904) : warning 219local variable "hash" shadows a variable at a preceding level
D
:\Olcay\pawno\include\YSI\y_commands.inc(1405) : warning 219local variable "hash" shadows a variable at a preceding level
D
:\Olcay\pawno\include\YSI\y_commands.inc(1460) : warning 219local variable "hash" shadows a variable at a preceding level
D
:\Olcay\pawno\include\YSI\y_commands.inc(1513) : warning 219local variable "hash" shadows a variable at a preceding level
D
:\Olcay\pawno\include\YSI\y_commands.inc(1535) : warning 219local variable "hash" shadows a variable at a preceding level
D
:\Olcay\pawno\include\YSI\y_commands.inc(1598) : warning 219local variable "hash" shadows a variable at a preceding level
D
:\Olcay\pawno\include\YSI\y_commands.inc(1826) : warning 219local variable "hash" shadows a variable at a preceding level
D
:\Olcay\pawno\include\YSI\y_commands.inc(1930) : warning 219local variable "hash" shadows a variable at a preceding level
D
:\Olcay\pawno\include\YSI\y_commands.inc(2071) : warning 219local variable "hash" shadows a variable at a preceding level
D
:\Olcay\pawno\include\YSI\y_commands.inc(2365) : warning 219local variable "hash" shadows a variable at a preceding level
D
:\Olcay\pawno\include\YSI\y_commands.inc(2494) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(696) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(907) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(913) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(986) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(987) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(1339) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(1373) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(1568) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(1569) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(2149) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(2150) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(2212) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(2330) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(2461) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(2512) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(2689) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(2694) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(2702) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(2814) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(2828) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(3068) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(3073) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(3106) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(3536) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(3540) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(3883) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(3900) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(4003) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(4028) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(4034) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(4036) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(4042) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(4044) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(4132) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(4170) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(4208) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(4251) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(4300) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(4316) : warning 217loose indentation
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(4322) : warning 217loose indentation 
Reply
#4

Why u wanna convert back to this outdated strcmp?!?
Reply
#5

Did you try to update YSI, maybe its outdated
Reply
#6

I don't think you can use:
pawn Код:
YCMD:whatever(playerid, params[])
Try using this:
pawn Код:
YCMD:whatever(playerid, params[], help)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)