There appear pumpkins
#1

There can appear that once dovlecii.Cum 5 minutes to my random spawn a pumpkin?
Код HTML:
new p = random(sizeof(pumpkins));
	CreateObject(19320,pumpkins[p][0],pumpkins[p][1],pumpkins[p][2],0,0,0);
and

Код:
stock const Float:pumpkins[][3] = {
    {1410.1044, -1305.7026, 9.3780},
    {811.0631, -1098.3042, 25.9063},
    {395.0076, -1892.1541, 7.8301},
    {1208.2128, -1997.4165, 69.0078},
    {1291.9706, -788.6403, 96.4609},
    {1319.6095, 1254.3007, 14.2731},
    {2000.8856, 1565.8356, 15.3672},
    {2592.7739, 2790.8081, 10.8203},
    {1058.6401, 1260.5609, 10.8203},
    {1697.7155, 679.0499, 14.8222},
    {2206.8350, 1286.4581, 10.8203},
    {2060.2539, -2376.2620, 16.1250},
    {2505.8127, -1693.7687, 13.5579},
    {1883.6287, 1990.4550, 7.5946}
};
Reply
#2

pawn Код:
forward pumpkinTimer();
new pTimer;

public OnGameModeInit()
{
    pTimer = SetTimer("pumpkinTimer", 5 * 60 * 1000, true);
    return 1;
}

public pumpkinTimer()
{
    new p = random(sizeof(pumpkins));
    CreateObject(19320,pumpkins[p][0],pumpkins[p][1],pumpkins[p][2],0,0,0);  
    return 1;
}
Reply
#3

Код:
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(927) : error 017: undefined symbol "pumpkins"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(927) : error 029: invalid expression, assumed zero
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(927) : warning 215: expression has no effect
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(928) : error 017: undefined symbol "pumpkins"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(25155) : warning 202: number of arguments does not match definition
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(19580) : warning 204: symbol is assigned a value that is never used: "pTimer"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply
#4

add this
pawn Код:
new Float:pumpkins[][3] = {
    {1410.1044, -1305.7026, 9.3780},
    {811.0631, -1098.3042, 25.9063},
    {395.0076, -1892.1541, 7.8301},
    {1208.2128, -1997.4165, 69.0078},
    {1291.9706, -788.6403, 96.4609},
    {1319.6095, 1254.3007, 14.2731},
    {2000.8856, 1565.8356, 15.3672},
    {2592.7739, 2790.8081, 10.8203},
    {1058.6401, 1260.5609, 10.8203},
    {1697.7155, 679.0499, 14.8222},
    {2206.8350, 1286.4581, 10.8203},
    {2060.2539, -2376.2620, 16.1250},
    {2505.8127, -1693.7687, 13.5579},
    {1883.6287, 1990.4550, 7.5946}
};
Reply
#5

Код HTML:
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(19578) : warning 204: symbol is assigned a value that is never used: "pTimer"
Reply
#6

uppp
Reply
#7

RO: Asigura-te ca ai asta la OnGameModeInit.

Код:
 pTimer = SetTimer("pumpkinTimer", 5 * 60 * 1000, true);
EN: Make sure you have this under OnPlayerGameModeInit.
Reply
#8

O am.Am adaugat-o.Acoloa imi si da eroare.
Reply
#9

//Edit: Nah write it like this:

PHP код:
forward pumpkinTimer();
new 
tmp_obj;
public 
OnGameModeInit()
{
    
SetTimer("pumpkinTimer"60 1000true);
    return 
1;
}
public 
pumpkinTimer()
{
    if(
tmp_objDestroyObject(tmp_obj);
    new 
random(sizeof(pumpkins));
    
tmp_obj CreateObject(19320,pumpkins[p][0],pumpkins[p][1],pumpkins[p][2],0,0,0);   
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)