Quote:
Originally Posted by Relaxed
PHP код:
CMD:criarportao( playerid, params[] )
{
if ( pInfo[playerid][MoedasCash] >= 250 )
{
if( isnull( params) )
return SendClientMessage( playerid, -1, "[ > ]: /criarportao [Senha]" );
if( !strval( params ) )
return SendClientMessage( playerid, -1, "[ > ]: USE SOMENTE NUMEROS." );
if( IsPlayerInAnyVehicle( playerid ) )
return SendClientMessage( playerid, -1, "[ > ] Saia Do Veiculo !" );
new Float:pPosPortao[4];
GetPlayerPos( playerid, pPosPortao[0], pPosPortao[1], pPosPortao[2] );
GetPlayerFacingAngle( playerid, pPosPortao[3] );
CreateGate( playerid, strval( params ), pPosPortao[0], pPosPortao[1], pPosPortao[2], pPosPortao[3] );
SendClientMessage( playerid, -1, "[ > ] Portгo Criado Com Sucesso" );
pInfo[playerid][MoedasCash] -= 250;
BPH_SetInt(gFile, "MoedasCash", BPH_GetInt(gFile, "MoedasCash") -= 250);
} else return SendClientMessage(playerid, AZUL_BPH, "Vocк nгo tem Cash suficiente criar um Portгo.");
return 1;
}
PHP код:
CMD:destruirportao( playerid, params[] )
{
for( new i = 0; i != MAX_GATES; i++ )
{
if( GateInfo[i][gCreated] == 1 )
{
if( IsPlayerInRangeOfPoint( playerid, 10.0, GateInfo[i][gX], GateInfo[i][gY], GateInfo[i][gZ] ) )
{
new szName[24];
GetPlayerName( playerid, szName, 24 );
if( !strcmp( szName, GateInfo[i][gPlacedBy], true ) || IsPlayerAdmin( playerid ) )
{
DestroyObject( GateInfo[i][gObject] );
format( GateInfo[i][gPlacedBy], 24, "None" );
GateInfo[i][gCreated] = 0;
GateInfo[i][gX] = 0.0;
GateInfo[i][gY] = 0.0;
GateInfo[i][gZ] = 0.0;
GateInfo[i][gA] = 0.0;
GateInfo[i][gPassword] = 0;
GateInfo[i][gStatus] = GATE_STATE_CLOSED;
pInfo[playerid][MoedasCash] += 250;
BPH_SetInt(gFile, "MoedasCash", BPH_GetInt(gFile, "MoedasCash") += 250);
SendClientMessage( playerid, -1, "[ > ] Voce Destruiu o portao e recebeu seus 250 Cash de volta para criar outro." );
new file[32];
format( file, 32, "Gates/gate_%d.ini", i );
if( BPH_FileExists( file ) )
BPH_RemoveFile( file );
break;
}
else
return SendClientMessage( playerid, -1, "Voce Nao E Dono Deste Portгo" );
}
else
return SendClientMessage( playerid, -1, "Nao Hб Portгo no local !" );
}
}
return 1;
}
|
Deu erro:
C:\Users\Natan\Desktop\Brasil Power Hard\gamemodes\BPH.pwn(58693) : warning 217: loose indentation
C:\Users\Natan\Desktop\Brasil Power Hard\gamemodes\BPH.pwn(58693) : error 022: must be lvalue (non-constant)
C:\Users\Natan\Desktop\Brasil Power Hard\gamemodes\BPH.pwn(58693) : warning 215: expression has no effect
C:\Users\Natan\Desktop\Brasil Power Hard\gamemodes\BPH.pwn(58693) : error 001: expected token: ";", but found ")"
C:\Users\Natan\Desktop\Brasil Power Hard\gamemodes\BPH.pwn(58693) : error 029: invalid expression, assumed zero
C:\Users\Natan\Desktop\Brasil Power Hard\gamemodes\BPH.pwn(58693) : fatal error 107: too many error messages on one line
Nessa linha:
PHP код:
BPH_SetInt(gFile, "MoedasCash", BPH_GetInt(gFile, "MoedasCash") -= 250);