Kako da nastimam da vipovi mogu samo svoja auta da getaju ?
Inace radim na modu Athlone ako neko moze da mi prilagodi sve oko cmd hvala unaprijed!
pokusavao sam da promijenim mjesto ali nije mi islo, ovako mi geta vozilo i i koje nije vase znaci moze sve i pise ovo vozilo nije vase ali ga geta
CMD:vgetcar( playerid, params[] ) {
if( PlayerInfo[ playerid ][ xVIPLevel ] >= 2 ) {
new vehicle = GetPlayerVehicleID( playerid );
new id;
if( sscanf( params, "i", id ) ) {
SendUsageMessage( playerid, "/getcar [carid(/dl)]");
return 1;
}
new Float:plocx, Float:plocy, Float:plocz;
GetPlayerPos( playerid, plocx, plocy, plocz );
Khalifa_SetVehiclePos( id, plocx, plocy+4, plocz );
if( PlayerInfo[ playerid ][ xVoziloID ][ 0 ] != -1 && VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 0 ] ][ vID ] == vehicle ) { }
else if( PlayerInfo[ playerid ][ xVoziloID ][ 1 ] != -1 && VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 1 ] ][ vID ] == vehicle ) { }
else if( PlayerInfo[ playerid ][ xVoziloID ][ 2 ] != -1 && VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 2 ] ][ vID ] == vehicle ) { }
else if( PlayerInfo[ playerid ][ xVoziloID ][ 3 ] != -1 && VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 3 ] ][ vID ] == vehicle ) { }
else if( PlayerInfo[ playerid ][ xRezervniKljucevi ] == ScriptIDVozila[ vehicle ] ) { }
else return GRESKA( playerid, "Ovo nije vase vozilo." );
}
else return GRESKA( playerid, ""col_chating"You are not authorized." );
return 1;
}
if( PlayerInfo[ playerid ][ xVoziloID ][ 0 ] != -1 && VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 0 ] ][ vID ] == vehicle ) { }
else if( PlayerInfo[ playerid ][ xVoziloID ][ 1 ] != -1 && VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 1 ] ][ vID ] == vehicle ) { }
else if( PlayerInfo[ playerid ][ xVoziloID ][ 2 ] != -1 && VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 2 ] ][ vID ] == vehicle ) { }
else if( PlayerInfo[ playerid ][ xVoziloID ][ 3 ] != -1 && VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 3 ] ][ vID ] == vehicle ) { }
else if( PlayerInfo[ playerid ][ xRezervniKljucevi ] == ScriptIDVozila[ vehicle ] ) { }
else return GRESKA( playerid, "Ovo nije vase vozilo." );
Koliko ove provjere ubijaju hahaha if () {} hahaha
CMD:vgetcar( playerid, params[] ) {
if( PlayerInfo[ playerid ][ xVIPLevel ] >= 2 ) {
if (isnull(params))
return SendUsageMessage(playerid, "/vgetcar [Kljuc ID]");
new keyid = strval(params) + 1;
if (1 > keyid > 4)
return GRESKA( playerid, "Kljucevi se krecu od 0-4." );
new vehicleid = PlayerInfo[playerid][xVoziloID][keyid];
if (vehicleid != -1)
return GRESKA( playerid, "Nemate vozilo na tom kljucu." );
static Float: pX,
Float: pY,
Float: pZ;
GetPlayerPos( playerid, pX, pY, pZ );
Khalifa_SetVehiclePos( VehicleInfo[vehicleid][vID], pX, pY + 4.0, pZ );
}
else return GRESKA( playerid, ""col_chating"You are not authorized." );
return 1;
}
Vidi ovako nesto?
e brate ovako ubacio sam cmd u skriptu i kad kucam /vgetcar 1 npr pise mi ta komanda ne postoji ako mozes rijesi mi ovaj bug hvala ti unaprijed
Pokusaj ovako sjebao sam :D
CMD:vgetcar( playerid, params[] ) {
if( PlayerInfo[ playerid ][ xVIPLevel ] >= 2 ) {
if (isnull(params))
return SendUsageMessage(playerid, "/vgetcar [Kljuc ID]");
new keyid = strval(params);
if (1 > keyid > 4)
return GRESKA( playerid, "Kljucevi se krecu od 1-4." );
keyid --;
new vehicleid = PlayerInfo[playerid][xVoziloID][keyid];
if (vehicleid == -1)
return GRESKA( playerid, "Nemate vozilo na tom kljucu." );
static Float: pX,
Float: pY,
Float: pZ;
GetPlayerPos( playerid, pX, pY, pZ );
Khalifa_SetVehiclePos( VehicleInfo[vehicleid][vID], pX, pY + 4.0, pZ );
}
else return GRESKA( playerid, ""col_chating"You are not authorized." );
return 1;
}
formular