niree
Wiek: 28 Na forum: 5312 dni Posty: 22
Nick w MP: nireee_niree
Witam, mog? prosi? o popraw? mojego kodu :
Pawn if( strcmp ( cmd , "/bwyplac" , true ) == 0 || strcmp ( cmd , "/bankomatwyplac" , true ) == 0 )
{
if( IsPlayerConnected ( playerid ))
{
if( PlayerToPoint ( 3.0 , playerid , 1153.4745 , - 1430.0631 , 15.0933 ) || PlayerToPoint ( 3.0 , playerid , 1496.2036 ,- 1748.8868 , 15.700 ) || PlayerToPoint ( 3.0 , playerid , 1746.9534 ,- 1943.4465 , 13.5703 ) || PlayerToPoint ( 3.0 , playerid , 1757.0641 ,- 1943.4401 , 13.5703 ) || PlayerToPoint ( 3.0 , playerid , 1304.95690900 ,- 1359.81958000 , 18.35354200 ) || PlayerToPoint ( 3.0 , playerid , 1301.990234375 ,- 1320.08203125 , 18.30354309082 ) || PlayerToPoint ( 3.0 , playerid , 1495 ,- 1022.9000244141 , 23.39999961853 ) || PlayerToPoint ( 3.0 , playerid , 525.59997558594 ,- 1293.0999755859 , 16.799999237061 ))
{
if ( PlayerInfo [ playerid ][ pKartaBank ] == 0 )
{
SendClientMessage ( playerid , COLOR_GRAD2 , " Nie posiadasz karty kredytowej (do kupienia w 24/7) !" );
return 1 ;
}
tmp = strtok ( cmdtext , idx );
if(! strlen ( tmp ))
{
SendClientMessage ( playerid , COLOR_GRAD2 , "U?YJ: /bwyplac [ilo??]" );
format ( string , sizeof (string), " Masz $%d na swoim koncie." , PlayerInfo [ playerid ][ pAccount ]);
SendClientMessage ( playerid , COLOR_GRAD3 , string );
return 1 ;
}
new cashdeposit = strval ( tmp );
if(! strlen ( tmp ))
{
SendClientMessage ( playerid , COLOR_GRAD2 , "U?YJ: /bwyplac [ilo??]" );
format ( string , sizeof (string), " Masz $%d na swoim koncie." , PlayerInfo [ playerid ][ pAccount ]);
SendClientMessage ( playerid , COLOR_GRAD3 , string );
return 1 ;
}
if ( cashdeposit > PlayerInfo [ playerid ][ pAccount ] || cashdeposit < 1 )
{
SendClientMessage ( playerid , COLOR_GRAD2 , " Nie masz a? tyle kasy !" );
return 1 ;
}
//ConsumingMoney[playerid] = 1;
GiveCash ( playerid , cashdeposit );
PlayerInfo [ playerid ][ pAccount ]= PlayerInfo [ playerid ][ pAccount ]- cashdeposit ;
format ( string , sizeof (string), " Wyp?aci?e? $%d ze swojego konta. Pozosta?o: $%d " , cashdeposit , PlayerInfo [ playerid ][ pAccount ]);
SendClientMessage ( playerid , COLOR_YELLOW , string );
return 1 ;
}
SendClientMessage ( playerid , COLOR_GREY , "" );
return 1 ;
}
return 1 ;
}
Chodzi o linijk? :
Pawn if( PlayerToPoint ( 3.0 , playerid , 1153.4745 , - 1430.0631 , 15.0933 ) || PlayerToPoint ( 3.0 , playerid , 1496.2036 ,- 1748.8868 , 15.700 ) || PlayerToPoint ( 3.0 , playerid , 1746.9534 ,- 1943.4465 , 13.5703 ) || PlayerToPoint ( 3.0 , playerid , 1757.0641 ,- 1943.4401 , 13.5703 ) || PlayerToPoint ( 3.0 , playerid , 1304.95690900 ,- 1359.81958000 , 18.35354200 ) || PlayerToPoint ( 3.0 , playerid , 1301.990234375 ,- 1320.08203125 , 18.30354309082 ) || PlayerToPoint ( 3.0 , playerid , 1495 ,- 1022.9000244141 , 23.39999961853 ) || PlayerToPoint ( 3.0 , playerid , 525.59997558594 ,- 1293.0999755859 , 16.799999237061 ))
Gdy? jest za d?uga, i wywala mi error podczas kompilacji.
Nie chc?, ?eby jakie? po?o?enie posz?o sie...tylko chce aby kod by? u?o?ony, i ?eby nie by?o erroru podczas kompilacji.
Tak samo z tym :
Pawn if( strcmp ( cmd , "/bsuma" , true ) == 0 || strcmp ( cmd , "/bankomatsuma" , true ) == 0 )
{
if( IsPlayerConnected ( playerid ))
{
if( PlayerToPoint ( 3.0 , playerid , 1153.4745 , - 1430.0631 , 15.0933 ) || PlayerToPoint ( 3.0 , playerid , 1496.2036 ,- 1748.8868 , 15.700 ) || PlayerToPoint ( 3.0 , playerid , 1746.9534 ,- 1943.4465 , 13.5703 ) || PlayerToPoint ( 3.0 , playerid , 1757.0641 ,- 1943.4401 , 13.5703 ) || PlayerToPoint ( 3.0 , playerid , 1302.4000244141 ,- 1320.8000488281 , 18.5 ) || PlayerToPoint ( 3.0 , playerid , 1305.1999511719 ,- 1359 , 18.5 ) || PlayerToPoint ( 3.0 , playerid , 1495 ,- 1022.9000244141 , 23.39999961853 ) || PlayerToPoint ( 3.0 , playerid , 525.59997558594 ,- 1293.0999755859 , 16.799999237061 ))
{
if ( PlayerInfo [ playerid ][ pKartaBank ] == 0 )
{
SendClientMessage ( playerid , COLOR_GRAD2 , " Nie posiadasz karty kredytowej (do kupienia w 24/7) !" );
return 1 ;
}
format ( string , sizeof (string), " Masz $%d na swoim koncie." , PlayerInfo [ playerid ][ pAccount ]);
SendClientMessage ( playerid , COLOR_YELLOW , string );
}
SendClientMessage ( playerid , COLOR_GREY , "" );
return 1 ;
}
return 1 ;
}
Pawn if( PlayerToPoint ( 3.0 , playerid , 1153.4745 , - 1430.0631 , 15.0933 ) || PlayerToPoint ( 3.0 , playerid , 1496.2036 ,- 1748.8868 , 15.700 ) || PlayerToPoint ( 3.0 , playerid , 1746.9534 ,- 1943.4465 , 13.5703 ) || PlayerToPoint ( 3.0 , playerid , 1757.0641 ,- 1943.4401 , 13.5703 ) || PlayerToPoint ( 3.0 , playerid , 1302.4000244141 ,- 1320.8000488281 , 18.5 ) || PlayerToPoint ( 3.0 , playerid , 1305.1999511719 ,- 1359 , 18.5 ) || PlayerToPoint ( 3.0 , playerid , 1495 ,- 1022.9000244141 , 23.39999961853 ) || PlayerToPoint ( 3.0 , playerid , 525.59997558594 ,- 1293.0999755859 , 16.799999237061 ))
Pozdrawiam.