Bin soweit gekommen, nur wenn ich spraye kommt kein object:
CMD:sprayecb(playerid,params[])
{
if(GetPVarInt(playerid,"SprayCan")==1)
{
new Float:x, Float:y, Float:z, Float:Facing;
GetPlayerPos(playerid,Float:x, Float:y, Float:z);
GetPlayerFacingAngle(playerid,Float:Facing);
CreateObject(1527,Float:x,Float:y,Float:z,Float:Facing,0,0);
SetPVarInt(playerid,"SprayCan",0);
SendClientMessage(playerid,COLOR_CMD,"Your spraycan is empty now.");
}
else
{
SendClientMessage(playerid,COLOR_CMD,"Sorry but you have no spraycan.");
}
return 1;