27.06.2011, 00:21
pawn Код:
//TOPO GAMEMODE
new canselafechada;
new canselaaberta;
forward tempocansela(playerid);
//ONGAMEMODEINIT
canselafechada = CreateObject(968,1216.78515625,306.50247192,19.94689178,0.00000000,90.00000000,245.25000000); //Fechado
//OnPlayerCommandText
if(!strcmp(cmdtext, "/comprarbilhete", true)) // By Ellis
{
{
if (PlayerToPoint(15, playerid,1212.7277,303.9298,19.5469)) //local onde pode usar o comando
{
DestroyObject( canselafechada );
canselaaberta = CreateObject(968,1216.55664062,305.94561768,19.94689178,0.00000000,9.00000000,245.24780273);
GivePlayerMoney(playerid, -500);
SetTimer("tempocansela", 6000, 0);
SendClientMessage(playerid, COLOR_GREEN,"{FFFFFF}Entras-te no parque de estacionamento do {008000}LaMovida {FFFFFF}e pagas-te {BF0000}500€{FFFFFF}.");
}
}
return 1;
}
if(!strcmp(cmdtext, "/usarbilhete", true)) // By Ellis
{
{
if (PlayerToPoint(15, playerid,1218.0685,301.7553,19.6039)) //local onde pode usar o comando
{
DestroyObject(canselafechada);
canselaaberta = CreateObject(968,1216.55664062,305.94561768,19.94689178,0.00000000,9.00000000,245.24780273);
SetTimer("tempocansela", 6000, 0);
SendClientMessage(playerid, COLOR_GREEN,"{FFFFFF}Saiste do parque de estacionamento do {008000}LaMovida{FFFFFF}.");
}
}
return 1;
}
//FIM DO GAMEMODE
public tempocansela()
{
DestroyObject(canselaaberta);
canselafechada = CreateObject(968,1216.78515625,306.50247192,19.94689178,0.00000000,90.00000000,245.25000000); // Cordenadas portao fechado
return 1;
}