public OnPlayerCommandText(playerid, cmdtext[]);
new a = 1;
new b = 2;
new c = 3;
// mas abajo...
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0) //para cambiar el texto
{
if(IsPlayerAdmin)
{
SetGameModeText("It's X-MAS!");
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You aren't a RCON admin");
}
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) //mientras a = 1, b = 2 y c = 3 repara el coche
{
while(a == 1 || b == 2 || c == 3)
{
SetVehicleHealth(vehicleid, 1000);
RepairVehicle(vehicleid);
}
return 1;
}
new.pwn(95) : error 055: start of function body without function header new.pwn(96) : error 010: invalid function or declaration new.pwn(98) : error 010: invalid function or declaration new.pwn(102) : error 010: invalid function or declaration new.pwn(106) : error 010: invalid function or declaration new.pwn(108) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
new a = 1;
new b = 2;
new c = 3;
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0) //para cambiar el texto
{
if(IsPlayerAdmin)
{
SetGameModeText("It's X-MAS!");
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You aren't a RCON admin");
}
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) //mientras a = 1, b = 2 y c = 3 repara el coche
{
while(a == 1 || b == 2 || c == 3)
{
SetVehicleHealth(vehicleid, 1000);
RepairVehicle(vehicleid);
}
return 1;
}
creo q con lo que te dijo MrDeath se solucionara todo. exagerast un poquito con lo de la syncro che...
|
No, lo de la sincronizaciуn es verdad. Acordate que los script de SA-MP funcionan en un solo hilo, por lo tanto debe estar "libre" para que otro callback sea llamado. Caer en un loop infinito detiene totalmente la sincronizaciуn del server, incluso aquellas cosas que no estan directamente relacionadas con el script (como el movimiento de los jugadores).
|