07.06.2012, 23:49
Bom, eu quando faзo o comando /detran ou aperto F, ele fecha o samp server sozinho...
o que esta acontecendo ?
o que esta acontecendo ?
pawn Код:
newCmd:detran(playerid) //--------------------------------------
{
if(PlayerToPoint(2.0, playerid, -2033.4347,-117.3490,1035.1719))
{
new listitems[] = " R$2000 Tirar Carteira de Motorista\n";
ShowPlayerDialog(playerid, DIALOG_DETRAN, DIALOG_STYLE_LIST, "D.E.T.R.A.N", listitems, "Confirmar", "Sair");
}
else
return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб no D.E.T.R.A.N !");
return 1;
}
pawn Код:
if(dialogid == DIALOG_DETRAN)
{
if(!response) return 1;
if(response)
{
if(listitem == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(Teste[i]==1)
{
SendClientMessage(playerid, COR_DRIFTERS, "Alguйm estб fazendo o teste...");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if(PlayerInfo[playerid][pCarLic] == 1)
{
SendClientMessage(playerid, COR_DRIFTERS, "Vocк jб tem licenзa terrestre.");
TogglePlayerControllable(playerid, 1);
return 1;
}
Teste[playerid] = 1;
KillTimer(testtempo);
TakingLesson[playerid] = 1;
SetVehicleToRespawn(testvehicles[0]);
PutPlayerInVehicle(playerid, testvehicles[0], 0);
TimeTest[playerid] = 0;
SetPlayerInterior(playerid, 0);
GameTextForPlayer(playerid, "~n~ ~n~ ~w~carteira de motorista ~n~~g~R$ 2000", 3000, 3);
ShowPlayerDialog(playerid, DIALOG_DETRAN2, DIALOG_STYLE_MSGBOX, " D.E.T.R.A.N ", " Tem certeza que deseja iniciar o teste ? ", "Iniciar", "Abandonar");
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_GREEN, "[D.E.T.R.A.N] Vocк nгo pode sair do veнculo, caso contrбrio quebrarб uma regra.");
SendClientMessage(playerid, COLOR_GREEN, "[D.E.T.R.A.N] Complete o percurso em 170 segundos.");
}
}
return 1;
}
if(dialogid == DIALOG_DETRAN2)
{
if(response)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
if(Teste[playerid] == 1)
{
SetPlayerRaceCheckpoint(playerid, 0, DriverTestCP[0][0],DriverTestCP[0][1],DriverTestCP[0][2],DriverTestCP[1][0],DriverTestCP[1][1],DriverTestCP[1][2],4.0);
CPorder[playerid] = 0;
TogglePlayerControllable(playerid, 1);
GivePlayerMoney(playerid, -2000);
testtempo = SetTimer("testtimer", 1000, 1);
PlayerPlaySound(playerid, 1057, X, Y, Z);
}
}
if(!response)
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
if(Teste[playerid] != 0) { TakingLesson[playerid] = 0; }
SetPlayerInterior(playerid,3);
Teste[playerid] = 0;
TimeTest[playerid] = 0;
SetPlayerPos(playerid,-2027.0715,-103.6059,1035.1818);
GameTextForPlayer(playerid, "~w~bem vindo ao~n~~r~D.E.T.R.A.N", 5000, 5);
PlayerInfo[playerid][pInt] = 3;
PlayerInfo[playerid][pLocal] = 9999;
}
}