Code:
command(stealcrate, playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, 2790.82, -2423.52, 13.63) || IsPlayerInRangeOfPoint(playerid, 4.0, 2790.82, -2408.43, 13.63))
{
new Float:posx, Float:posy, Float:posz;
new string[128];
new object = PlayerObjects[playerid];
GetPlayerPos(playerid, posx, posy, posz);
object = CreateObject(1271, posx, posy+0.6, posz+0.5, 0.0, 0.0, 0.0, 100);
AttachObjectToPlayer(object, playerid, posx, posy+0.6, posz+0.5, 0.0, 0.0, 0.0);
format(string, sizeof(string), "You have picked up a crate of ammo, please put the crate in your trunk (/dropcrate).");
SCM(playerid, COLOR_WHITE, string);
return 1;
}
else
{
SCM(playerid, COLOR_GREY, "You are not near the crates!");
return 1;
}
}
but when you type the command, it says the crate has been created, but, nothing shows up? Any help?