27.10.2012, 16:00
try this:
UNTESTED!, also i put 1 line extra at the ondialogresponse, so that the player will automaticcally be put back in his car.
this should work
pawn Код:
if(strcmp(cmd, "/tablicki", true) == 0)
{
if(gPlayerLogged[playerid] == 0)
{
SCM(playerid,COLOR_WHITE, "{FF4040}GRESKA:{FFFFFF}Seuste ne ste Logiran!");
}
else if(gPlayerLogged[playerid] == 1)
{
ShowPlayerDialog(playerid, 123456, DIALOG_STYLE_INPUT, "{FFFFFF}Change your vehicle number plate","{FFFFFF}Please enter your desired text for your vehicle number plate.","Set","Cancel");
}
return 1;
}
pawn Код:
if(dialogid == 123456)
{
if(response)
{
SetVehicleNumberPlate(playerVeh, inputtext);
GetPlayerPos(playerid, vehPos[0], vehPos[1], vehPos[2]);
GetVehicleZAngle(playerVeh, vehPos[3]);
SetVehicleToRespawn(playerVeh);
SetVehiclePos(playerVeh, vehPos[0], vehPos[1], vehPos[2] );
SetVehicleZAngle(playerVeh, vehPos[3]);
PutPlayerInVehicle(playerid, PlayerVeh, 0);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Mora da imate tablicka!");
}
return 1;
}
this should work