#include <a_samp> #include <cpstream> new assalto; public OnGameModeInit() { assalto = CPS_AddCheckpoint(153.1188,-64.5729,1.5781,2.0,100); return 1; } public OnPlayerEnterCheckpoint(playerid) { if(CPS_IsPlayerInCheckpoint(playerid,assalto)) { SendClientMessage(playerid,0x008040AA,"Inicio de um assalto!"); ShowPlayerDialog(playerid, 430, DIALOG_STYLE_MSGBOX,"Assalto", "Deseja fazer um assalto?", "Sim","Nao"); return 1; } return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 430) { if(response) { SendClientMessage(playerid, -1, "vб atй o local marcado no mapa."); SendClientMessageToAll(-1, "um novo assalto foi iniciado \"/cop\" para detelo!"); } return 1; } return 1; }
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 430)
{
if(response == 1)
{
SendClientMessage(playerid, -1, "vб atй o local marcado no mapa.");
SendClientMessageToAll(-1, "um novo assalto foi iniciado \"/cop\" para detelo!");
return 1;
}
}
return 1;
}
PHP код:
|
public OnPlayerEnterCheckpoint(playerid)
{
if(CPS_IsPlayerInCheckpoint(playerid,assalto))
{
SendClientMessage(playerid,0x008040AA,"Inicio de um assalto!");
ShowPlayerDialog(playerid, 430, DIALOG_STYLE_MSGBOX,"Assalto", "Deseja fazer um assalto?", "Sim","Nao");
print("Tudo ok.\n");
return 1;
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
printf("OnPlayerResponse(%i, %i, %i, %i, %s)", playerid, dialogid, response, listitem, inputtext);
if(dialogid == 430)
{
if(response == 1)
{
SendClientMessage(playerid, -1, "vб atй o local marcado no mapa.");
SendClientMessageToAll(-1, "um novo assalto foi iniciado \"/cop\" para detelo!");
return 1;
}
}
return 1;
}
PHP код:
PHP код:
|
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==430)
{
if(response==1)
{
SendClientMessage(playerid, -1, "vб atй o local marcado no mapa.");
SendClientMessageToAll(-1, "um novo assalto foi iniciado \"/cop\" para detelo!");
}
return 1;
}
return 1;
}