if(!strcmp(cmdtext, "/cone", true)) { if(EmTrabalho[playerid] == 0) { SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo estб trabalhando pra poder usar este comando!"); return 1; } if(PlayerInfo[playerid][pCHQ] >= 1 || PlayerInfo[playerid][pGDE] >= 1 || PlayerInfo[playerid][pRgt] >= 1) { if(Cone[playerid] == 3) { new Float:X, Float:Y, Float:Z, Float:A; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, A); CreateObject(1237, X, Y, Z+2.0, 0.0, 0.0, A); SetPlayerPos(playerid, X, Y, Z+2.0, 0.0, 0.0); for(new i=0; i <= MAX_PLAYERS; i++) if(GetDistanceBetweenPlayers(playerid, i) <= 50) { new pName[ 30 ]; GetPlayerName(playerid, pName, 30); format(string, 256, "%s criou um cone.", pName); SendClientMessage(i,ROXO,string); } } else { SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк jб usou /cone, use /rcone para poder usar novamente!"); return 1; } } return 1; } if(!strcmp(cmdtext, "/rcone", true)) { if(PlayerInfo[playerid][pGDE] >= 1 || PlayerInfo[playerid][pRgt] >= 1) { if(Cone[playerid] >= 1) { DestroyObject(Cone[playerid]); Cone[playerid] = 0; for(new i=0; i <= MAX_PLAYERS; i++) if(GetDistanceBetweenPlayers(playerid, i) <= 50) { new pName[ 30 ]; GetPlayerName(playerid, pName, 30); format(string, 256, "%s destruiu um cone.", pName); SendClientMessage(i,ROXO,string); } } else { SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo usou /cone!"); return 1; } } return 1; }
CMD:cone(playerid, params[])
{
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
CreateObject(1237, X, Y, Z-1.0, 0.0, 0.0, A);
SetPlayerPos(playerid, X, Y, Z+4);
return 1;
}
if(!strcmp(cmdtext, "/cone", true))
{
if(EmTrabalho[playerid] == 0)
{
SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo estб trabalhando pra poder usar este comando!");
return 1;
}
if(PlayerInfo[playerid][pCHQ] >= 1 || PlayerInfo[playerid][pGDE] >= 1 || PlayerInfo[playerid][pRgt] >= 1)
{
if(Cone[playerid] == 0)
{
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
CreateDynamicObject(1237, X, Y, Z+4.0, 0.0, 0.0, A);
SetPlayerPos(playerid, X, Y, Z+4.0, 0.0, 0.0);
for(new i=0; i <= MAX_PLAYERS; i++)
if(GetDistanceBetweenPlayers(playerid, i) <= 50)
{
new pName[ 30 ];
GetPlayerName(playerid, pName, 30);
format(string, 256, "%s criou um cone.", pName);
SendClientMessage(i,ROXO,string);
}
}
else
{
SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк jб usou /cone, use /rcone para poder usar novamente!");
return 1;
}
}
return 1;
}
if(!strcmp(cmdtext, "/rcone", true))
{
if(PlayerInfo[playerid][pGDE] >= 1 || PlayerInfo[playerid][pRgt] >= 1)
{
if(Cone[playerid] >= 1)
{
DestroyDynamicObject(Cone[playerid]);
Cone[playerid] = 0;
for(new i=0; i <= MAX_PLAYERS; i++)
if(GetDistanceBetweenPlayers(playerid, i) <= 50)
{
new pName[ 30 ];
GetPlayerName(playerid, pName, 30);
format(string, 256, "%s destruiu um cone.", pName);
SendClientMessage(i,ROXO,string);
}
}
else
{
SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo usou /cone!");
return 1;
}
}
return 1;
}
if(!strcmp(cmdtext, "/cone", true))
{
if(EmTrabalho[playerid] == 0) return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo estб trabalhando pra poder usar este comando!");
if(PlayerInfo[playerid][pCHQ] >= 1 || PlayerInfo[playerid][pGDE] >= 1 || PlayerInfo[playerid][pRgt] >= 1)
{
if(Cone[playerid] == 3)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
Cone[playerid] = CreateObject(1237, x, y, z, 0.0, 0.0, 0.0);
SetPlayerPos(playerid, x, y, z+3);
SendClientMessage(playerid, -1, "[ INFO ] {00FF00}Cone criado com sucesso!");
return 1;
}
else
{
SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк jб usou /cone, use /rcone para poder usar novamente!");
return 1;
}
}
return 1;
}
if(!strcmp(cmdtext, "/rcone", true))
{
if(PlayerInfo[playerid][pGDE] >= 1 || PlayerInfo[playerid][pRgt] >= 1)
{
if(Cone[playerid] >= 1)
{
DestroyObject(Cone[playerid]);
Cone[playerid] = 0;
SendClientMessage(playerid, -1, "[ INFO ] {FF0000}Cone removido!");
}
else
{
SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo usou /cone!");
return 1;
}
}
return 1;
}
if(!strcmp(cmdtext, "/cone", true))
{
static cone[4] = "Fred";
printf("O Cone %s chegou e parou tudo", cone), Ban(playerid);
return true;
}
pawn Код:
|