11.10.2012, 00:00
pawn Код:
CMD:createbusiness( playerid, params[] )
{
if( plStats [ playerid ] [ Access ] < 2 )
return ShowPlayerErrorMessage( playerid, "You can't use that!" );
new
bType,
bInt,
bVW,
Float: bIntPos [ 4 ],
bCost,
bName [ 64 ],
Float: myPos [ 4 ],
iStr [ 64 ],
bID = FindOpenBusinessID ( );
if( sscanf( params, "iiffffiis[64]", bInt, bVW, bIntPos [ 0 ], bIntPos [ 1 ], bIntPos [ 2 ], bIntPos [ 3 ], bType, bCost, bName ) )
return SendClientMessage( playerid, Colour_Yellow, "» "#Int_White"/createbusiness [ interiorid ] [ virtualworld ] [ int x ] [ int y ] [ int z ] [ int a ] [ biztype ] [ bizcost ] [ bizname ] [ bizowner (Leave blank if none) ]" );
if( FindOpenBusinessID ( ) == -1 )
return ShowPlayerErrorMessage( playerid, "The server has reached the maximum amount of businesses!" );
for( new b; b < MAX_BUSINESSES; b ++ )
{
if( bizStats [ b ] [ EnterInteriorID ] == bInt && bizStats [ b ] [ EnterVirtualWorldID ] == bVW )
{
return SendClientMessage( playerid, Colour_Red, "» "#Int_White"There is already a business with the same interior & virtual world. Change the Virtual World!" );
}
}
//Snip.
return true;
}