18.08.2014, 13:04
How to fix that?
BTW, I am newbie. I suck a little bit on scripting;p
BTW, I am newbie. I suck a little bit on scripting;p
CMD:supmobil(playerid, params[])
{
if(HasSupmobil[playerid] == 1)
{
for(new v=0; v<MAX_VEHICLES; v++)
{
if(v == SupMobil[playerid])
{
SupMobilLocked[v] = 0;
}
DestroyVehicle(SupMobil[playerid]);
HasSupmobil[playerid] = 0;
DestroyDynamic3DTextLabel(Text3D:SupMobilText[playerid]);
DestroyObject(SupMobilLicht[playerid]);
DestroyObject(SupMobilLicht2[playerid]);
SendClientMessage(playerid,COLOR_RED,"Supmobil destroyed!");
return 1;
}
if(pInfo[playerid][Adminlevel] >= 1)
{
ShowPlayerDialog(playerid, DIALOG_SUPMOBIL, DIALOG_STYLE_LIST, "Supmobil","Classic Supmobil\nComet Mobil\nQuad Mobil", "Spawnen", "Abbruch");
}
else
{
SendClientMessage(playerid,0xFF0000FF,"{FF0000}[SERVER]{BABABA}You're not authorized to use that command.");
return 1;
}
}
}
return 1;
}
}
CMD:supmobil(playerid, params[])
{
if(!pInfo[playerid][Adminlevel]) return SendClientMessage(playerid, 0xFF0000FF, "[SERVER] {BABABA}You're not authorized to use that command.");
if(HasSupmobil[playerid] == 1)
{
for(new v = 0; v < MAX_VEHICLES; v++)
{
if(v == SupMobil[playerid]) SupMobilLocked[v] = 0;
}
DestroyVehicle(SupMobil[playerid]);
HasSupmobil[playerid] = 0;
DestroyDynamic3DTextLabel(Text3D:SupMobilText[playerid]);
DestroyObject(SupMobilLicht[playerid]);
DestroyObject(SupMobilLicht2[playerid]);
SendClientMessage(playerid, COLOR_RED, "Supmobil destroyed!");
return 1;
}
ShowPlayerDialog(playerid, DIALOG_SUPMOBIL, DIALOG_STYLE_LIST, "Supmobil", "Classic Supmobil\nComet Mobil\nQuad Mobil", "Spawnen", "Abbruch");
return 1;
}
[code that has fucked up indentation even more than the main one]
|
CMD:supmobil(playerid, params[])
{
if(HasSupmobil[playerid] == 1)
{
for(new v=0; v<MAX_VEHICLES; v++)
{
if(v == SupMobil[playerid])
{
SupMobilLocked[v] = 0;
}
DestroyVehicle(SupMobil[playerid]);
HasSupmobil[playerid] = 0;
DestroyDynamic3DTextLabel(Text3D:SupMobilText[playerid]);
DestroyObject(SupMobilLicht[playerid]);
DestroyObject(SupMobilLicht2[playerid]);
SendClientMessage(playerid,COLOR_RED,"Supmobil destroyed!");
break; // You had return 1 here
}
if(pInfo[playerid][Adminlevel] >= 1)
{
ShowPlayerDialog(playerid, DIALOG_SUPMOBIL, DIALOG_STYLE_LIST, "Supmobil","Classic Supmobil\nComet Mobil\nQuad Mobil", "Spawnen", "Abbruch");
}
else
{
SendClientMessage(playerid,0xFF0000FF,"{FF0000}[SERVER]{BABABA}You're not authorized to use that command.");
return 1;
}
}
return 1;
}