15.12.2010, 21:02
pawn Код:
if ( strcmp( cmd, "/slap", true ) == 0 )
{
new tmp[256];
if(!IsPlayerAdmin(playerid)) return 0;
else
tmp = strtok( cmdtext, idx );
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_ERROR, "/slap [playerid]");
return 1;
}
new Float:X, Float:Y, Float:Z;
GetPlayerPos( strval(tmp), X, Y, Z );
SetPlayerPos( strval(tmp), X, Y, Z+5 ); /// modifica esse 5 se quizer mais ou menos altura
return 1;
}
pawn Код:
if(strcmp(cmd, "/a", true) == 0)
{
new length = strlen(cmdtext);
if(!IsPlayerAdmin(playerid)) return 0;
else
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_ERROR, "USAGE: /a [text]");
return 1;
}
SendClientMessageToAll(Color_Blue,result); /// Tenta usar esse BLUE como 0x1475EBAA
return 1;
}
pawn Код:
if ( strcmp( cmd, "/respawn", true ) == 0 )
{
if(!IsPlayerAdmin(playerid)) return 0;
else
for(new i = 0; i < MAX_VEHICLES; i++)
{
SetVehicleToRespawn(i);
SendClientMessageToAll(Color_yellow,result); // esse amarelo pode ser 0xF0EB0FAA?
}
return 1;
}