24.03.2014, 01:37
Quote:
Entгo velho deu 2 erros agora:
pawn Code:
|
pawn Code:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
CMD:setcar(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, vermelho, "Vocк nгo tem permissгo!");
new modelo, cor1, cor2;
if(sscanf(cmdtext, "s[8]dD(-1)D(-1)", cmd, modelo, cor1, cor2))
{
SendClientMessage(playerid, verde, "Use: /setcar [modelo] [cor1] [cor2]");
return 1;
}
if(modelo >= 400 && modelo <= 611)
{
if(IsPlayerInAnyVehicle(playerid))
{
new playerip[64],
Float:X, Float:Y, Float:Z,
Float:ang;
GetPlayerPos(playerid, X, Y, Z);
GetVehicleZAngle(GetPlayerVehicleID(playerid), ang);
GetPlayerIp(playerid, playerip, sizeof(playerip));
SetTimerEx("CriarVeiculo", 5000, false, "dffffdd", modelo, X, Y, Z, ang, cor1, cor2);
SendClientMessage(playerid, verde, "Veнculo setado com sucesso!");
}
else
{
SendClientMessage(playerid, verde, "vocк estб em um veiculo saia dele para criar outro !");
}
}
else
{
SendClientMessage(playerid, verde, "ID fora do normal! | ID's = 400-611");
}
return 1;
}
forward CriarVeiculo(m, Float:x, Float:y, Float:z, Float:r, c, d);
public CriarVeiculo(m, Float:x, Float:y, Float:z, Float:r, c, d)
{
AddStaticVehicleEx(m, x, y, z, r, c, d, 30);
return 1;
}