new Checkpoint[20];
forward RobarBurgerNuevamente(playerid);
Checkpoint[0] = CreateDynamicCP(-1911.8503,828.4307,35.1756,138.4753,0,0,0,0,0); //Entrada BurgerShot
Checkpoint[1] = CreateDynamicCP(363.4130,-74.5787,1001.5078,314.7000,0,0,0,0,0); //Interior BurgerShot
Checkpoint[2] = CreateDynamicCP(378.3753,-57.4592,1001.5078,355.4337,0,0,0,0,0); //Robo BurgerShot
CMD:robarburger(playerid,params[])
{
if(IsPlayerInDynamicCP(playerid,Checkpoint[2]))
{
SetPVarInt(playerid, "RobandoBurger", 30);
SetPVarInt(playerid, "BurgerRobadoRecientemente", 1);
SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid) + 2);
@Robbing1(playerid);
return 1;
}
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == Checkpoint[0])
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Bienvenido a BurgerShot");
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid,363.4130,-74.5787,1001.5078);
SetPlayerFacingAngle(playerid,89.2370);
}
if(checkpointid == Checkpoint[1])
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-1911.8503,828.4307,35.1756);
SetPlayerFacingAngle(playerid,2.7449);
}
if(checkpointid == Checkpoint[2])
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Utiliza /robarburger para robar la tienda!");
}
return 1;
}
public RobarBurgerNuevamente(playerid)
{
if(GetPVarInt(playerid, "BurgerRobadoRecientemente") == 1)
{
SetPVarInt(playerid, "BurgerRobadoRecientemente", 0);
return 1;
}
return 1;
}
@Robbing1(playerid);
@Robbing1(playerid)
{
new mrand =random(GetPlayerMoney(playerid));
new string[120];
new Time = GetPVarInt(playerid, "RobandoBurger");
if(!IsPlayerConnected(playerid))
return 0;
if(Time < 1)
{
SetPVarInt(playerid, "RobandoBurger", 0);
SetTimer("RobarBurgerNuevamente", 360000, 0);
GivePlayerMoney(playerid,mrand);
SetPlayerScore(playerid,GetPlayerScore(playerid) + 2);
format(string,sizeof(string),"Robaste $%d de la tienda BurgerShot",mrand,playerid);
return SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
}
new str[30];
format(str, sizeof(str), "Tiempo para robar nuevamente la tienda: %d", Time);
GameTextForPlayer(playerid, str, 2500, 3);
SetPVarInt(playerid, "RobandoBurger", Time - 1);
SetTimerEx("@Robbing1", 1000, false, "i", playerid);
return 1;
}
C:\Users\Servidor\Desktop\Escritorio\Cop and Robbers\gamemodes\PYC.pwn(184) : warning 202: number of arguments does not match definition C:\Users\Servidor\Desktop\Escritorio\Cop and Robbers\gamemodes\PYC.pwn(185) : warning 202: number of arguments does not match definition C:\Users\Servidor\Desktop\Escritorio\Cop and Robbers\gamemodes\PYC.pwn(186) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Warnings. |
Checkpoint[0] = CreateDynamicCP(-1911.8503,828.4307,35.1756,138.4753,0,0,0,0,0); //Entrada BurgerShot
Checkpoint[1] = CreateDynamicCP(363.4130,-74.5787,1001.5078,314.7000,0,0,0,0,0); //Interior BurgerShot
Checkpoint[2] = CreateDynamicCP(378.3753,-57.4592,1001.5078,355.4337,0,0,0,0,0); //Robo BurgerShot
AddPlayerClass(12,-1911.8503,828.4307,35.1756,138.4753,0,0,0,0,0,0); // entradaburger AddPlayerClass(12,363.4130,-74.5787,1001.5078,314.7000,0,0,0,0,0,0); // salidaburger AddPlayerClass(12,378.3753,-57.4592,1001.5078,355.4337,0,0,0,0,0,0); // lugarroboburger |
CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid, interiorid, playerid, Float:streamdistance);
CreateDynamicCP(-1911.8503, 828.4307, 35.1756, 1.0, 0, 0, playerid, 6000.0); // Entrada burger
CreateDynamicCP(363.4130, -74.5787, 1001.5078, 1.0, 0, INTERIORBURGER, playerid, 6000.0); // Salida burger
CreateDynamicCP(378.3753, -57.4592, 1001.5078, 1.0, 0, INTERIORBURGER, playerid, 6000.0); // Lugar robo burger