22.03.2015, 10:51
Код:
new Shotgundrop[MAX_PLAYERS];
new Float: shotgunx, Float: shotgunz, Float: shotguny;
CMD:dropgun(playerid, params[])
{
GetPlayerPos(playerid, shotgunx, shotguny,shotgunz);
Shotgundrop[playerid] = CreateDynamicObject(2034,shotgunx, shotguny,shotgunz-0.9, 0, 0, 0.00);
return 1;
}
CMD:pick(playerid, params[])
{
if(IsValidDynamicObject(Shotgundrop[playerid]) && IsPlayerInRangeOfPoint(playerid,2.0,shotgunx, shotguny,shotgunz))
{
DestroyDynamicObject(Shotgundrop[playerid]);
}
return 1;
}
1 st problem : If I use dropgun cmd and then other player use it, my coordinates wouldn't be effective anymore, because, second player changed it... How do I save object coordinates into different variable for each player?
2 st problem : If I try cmd pick on other player object it would check If my object exist, not that player, right? (not tested it yet) If so, how do I fix that?


