30.06.2011, 14:55
Hello, I got a problem.
I got a code that is supposed to make an attached object on me:
But it wont, also when i use one of these commands in game i get Server: Unknown command.
What did i do wrong here? Can anyone give me a hand?
I got a code that is supposed to make an attached object on me:
pawn Код:
CMD:enter(playerid, params[])
{
for(new id = 0; id < sizeof(locations); id++)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, locations[id][0], locations[id][1], locations[id][2]))
{
if(IsPlayerInRangeOfPoint(playerid, 50, -159.69033813477,-90.585571289063,1066.5211181641))
{
SetPlayerAttachedObject( playerid, 0, 1349, 17, -0.571150, 1.182301, -0.020726, 90.395317, 67.863235, 359.453979, 1.000000, 1.000000, 1.000000 ); // CJ_SHTROLLY - shopping
}
LoadingForPlayer(playerid,1500,COLOR_GREEN);
// teleport
SetPlayerPos(playerid, toPoint[id][0], toPoint[id][1], toPoint[id][2]);
SetPlayerInterior(playerid, toInterior[id]);
isInInterior[playerid] = id;
SendClientMessage(playerid, 0x00FF00AA, "Type /exit to exit the building");
return 1;
}
}
SendClientMessage(playerid, 0xFF0000AA, "You need to be closer to a pickup to enter a building!");
return 1;
}
pawn Код:
CMD:BuyBackpack(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, -152.7479,-72.4470,1065.8430))
{
SetPlayerAttachedObject( playerid, 0, 3026, 1, -0.135905, -0.035217, -0.004736, 0.000000, 0.000000, 0.000000, 0.938511, 1.195391, 1.403976 );
GetPlayerMoney(25);
}
return 1;
}
CMD:BuyBeer(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, -166.8134,-72.7598,1065.8430))
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
GetPlayerMoney(5);
}
return 1;
}
CMD:BuySprunk(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, -166.8134,-72.7598,1065.8430))
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
GetPlayerMoney(5);
}
return 1;
}
CMD:BuyWhine(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, -166.8134,-72.7598,1065.8430))
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
GetPlayerMoney(5);
}
return 1;
}