Ajuda no /goto -
Trololo - 31.07.2012
To tentando fazer um filterscript aqui so que o Pawno da crash todas vez que tento compilar
Ajuda pf
Код:
if(strcmp(cmd, "/goto", true) == 0)
{
#if !defined COLOR_DBLUE
#define COLOR_DBLUE 0x7777DDFF
#endif
#if !defined COLOR_BLUE
#define COLOR_BLUE 0x33CCFFAA
#endif
#if !defined COLOR_RED
#define COLOR_RED 0xAA3333AA
#endif
new string[60];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_DBLUE, "Uso correto: /goto [id do player]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
giveplayerid = strval(tmp);
if(IsPlayerConnected(giveplayerid))
{
new PlayerName[30], GivePlayerName[30];
GetPlayerName(playerid, PlayerName, 30);
GetPlayerName(giveplayerid, GivePlayerName, 30);
format(string, sizeof(string), "Vocк se teleportou para %s(%i).", GivePlayerName, giveplayerid);
SendClientMessage(playerid, COLOR_BLUE, string);
GetPlayerPos(giveplayerid, plocx, plocy, plocz);
new intid = GetPlayerInterior(giveplayerid);
SetPlayerInterior(playerid,intid);
printf("[Command] %s usou /goto para se teleportar para %s.", PlayerName, GivePlayerName);
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
}
else
{
format(string, sizeof(string), "%d nгo й um player ativo!", giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
}
return 1;
}
Re: Ajuda no /goto -
R3S1D3NT1 - 31.07.2012
Coloke isso no topo do gm
PHP код:
#define COLOR_DBLUE
#define COLOR_DBLUE 0x7777DDFF
#define COLOR_BLUE
#define COLOR_BLUE 0x33CCFFAA
#define COLOR_RED
#define COLOR_RED 0xAA3333AA
aki o code
PHP код:
if(strcmp(cmd, "/goto", true) == 0)
{
new string[60];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_DBLUE, "Uso correto: /goto [id do player]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
giveplayerid = strval(tmp);
if(IsPlayerConnected(giveplayerid))
{
new PlayerName[30], GivePlayerName[30];
GetPlayerName(playerid, PlayerName, 30);
GetPlayerName(giveplayerid, GivePlayerName, 30);
format(string, sizeof(string), "Vocк se teleportou para %s(%i).", GivePlayerName, giveplayerid);
SendClientMessage(playerid, COLOR_BLUE, string);
GetPlayerPos(giveplayerid, plocx, plocy, plocz);
new intid = GetPlayerInterior(giveplayerid);
SetPlayerInterior(playerid,intid);
printf("[Command] %s usou /goto para se teleportar para %s.", PlayerName, GivePlayerName);
}
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}else{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}else{
format(string, sizeof(string), "%d nгo й um player ativo!", giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
}
return 1;
}
n mexi ne nada so consertei umas chaves ae que axo que tava errado i organizei tenta ae
Re: Ajuda no /goto -
Trololo - 31.07.2012
Continua dando Crash no pawno =| essa nem eu entendi parece estar tudo certinho
Respuesta: Ajuda no /goto -
[JD]BlackFire - 31.07.2012
possui algum erro grave ou faltando vбrias chaves no gamemode.