Why it's not working anymore? EditObject
#1

I have this system to create ATMs ingame:

PHP код:
CMD:makeatm(playeridparams[]) {
    new 
atmidname[30];
    if(
sscanf(params,"is[30]"atmidname)) return SendClientMessage(playerid, -1"Use: /makeatm [id] [name]");
    if(
atmid && atmid MAX_ATMS) return SendClientMessage(playerid, -1"Choose a number between 1-MAX_ATMS");
    new 
Float:xFloat:yFloat:zFloat:vA;
    
GetPlayerPos(playeridxyz);
    
GetPlayerFacingAngle(playeridvA);
    
AtmInfo[atmid][atmX] = x;
    
AtmInfo[atmid][atmY] = y;
    
AtmInfo[atmid][atmZ] = z;
    
AtmInfo[atmid][atmName] = name;
    
CreatingATMObject[playerid] = atmid;
    
ATMobject[atmid] = CreateObject(2942+ (1.0 floatsin(-vAdegrees)), + (1.0 floatcos(-vAdegrees)), z0.00.00.0);
    
EditObject(playeridATMobject[atmid]);
    return 
1;

I was working, but today i tried to create a ATM and nothing happen, nothing pritting on server.log
Anybody know what could be?
Reply
#2

Maybe the object is created as "createdynamicobject" and u are using EditObject not EditDynamicObject..
Reply
#3

Shouldnt the floatsin and floatcos code be put in the angle section? This might be the issue, your ATM is probably appearing far away from where it was initially created.
Reply
#4

for first, you don't need this cosinus and sinus functions.
make sure that object is created in player range.
Reply
#5

Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
Maybe the object is created as "createdynamicobject" and u are using EditObject not EditDynamicObject..
It was it
+rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)