09.02.2015, 17:29
Osea que esto
Asн?
EDIT: Pero si cambio de 'new' a #define, no podre usarlo como variable, ya que yo estoy usandolo asн
Es decir, entonces envйs de usar Switch, uso If.
pawn Код:
new Entrega_247;
new Entrega_Prendas;
new Entrega_Repuestos;
new Finalizar_247;
new Finalizar_Prendas;
new Finalizar_Repuestos;
// їLo cambio a esto?
#define Entrega_247 0
#define Entrega_Prendas 1
#define Entrega_Repuestos 2
#define Finalizar_247 3
#define Finalizar_Prendas 4
#define Finalizar_Repuestos 5
EDIT: Pero si cambio de 'new' a #define, no podre usarlo como variable, ya que yo estoy usandolo asн
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
switch(checkpointid)
{
case Entrega_247:
{
SendClientMessage(playerid, -1, "Entregaste el pedido satisfactoriamente, ahora vuelve a Ocean Docks con el camion.");
Finalizar_247 = CreateDynamicCP(1, 1, 1, 5.0, -1, -1, playerid, 100000.0);
}
case Entrega_Prendas:
{
SendClientMessage(playerid, -1, "Entregaste el pedido satisfactoriamente, ahora vuelve a Ocean Docks con el camion.");
Finalizar_Prendas = CreateDynamicCP(1, 1, 1, 5.0, -1, -1, playerid, 100000.0);
}
case Entrega_Repuestos:
{
SendClientMessage(playerid, -1, "Entregaste el pedido satisfactoriamente, ahora vuelve a Ocean Docks con el camion.");
Finalizar_Repuestos = CreateDynamicCP(1, 1, 1, 5.0, -1, -1, playerid, 100000.0);
}
case Finalizar_247:
{
new lalalaputo = GetPlayerVehicleID(playerid);
SetVehicleToRespawn(lalalaputo);
GivePlayerMoneyEx(playerid, 750);
Informacion[playerid][pHabilidad2]++;
SendClientMessage(playerid, -1, "Terminaste la entrega satisfactoriamente y se te han otorgado $750 + 1 de habilidad de camionero.");
}
case Finalizar_Prendas:
{
new lalalaputo = GetPlayerVehicleID(playerid);
SetVehicleToRespawn(lalalaputo);
GivePlayerMoneyEx(playerid, 750);
Informacion[playerid][pHabilidad2]++;
SendClientMessage(playerid, -1, "Terminaste la entrega satisfactoriamente y se te han otorgado $750 + 1 de habilidad de camionero.");
}
case Finalizar_Repuestos:
{
new lalalaputo = GetPlayerVehicleID(playerid);
SetVehicleToRespawn(lalalaputo);
GivePlayerMoneyEx(playerid, 750);
Informacion[playerid][pHabilidad2]++;
SendClientMessage(playerid, -1, "Terminaste la entrega satisfactoriamente y se te han otorgado $750 + 1 de habilidad de camionero.");
}
}
return 1;
}