Load player objects
#1

Can you tell me how to script a command that will load the player objects of a specific player?
Example: /loadplayerobjects <ID>(It will load the player objects of this player...)
Reply
#2

There are many ways, it depends on which method of saving/loading, and what type of script you're making.
Reply
#3

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
There are many ways, it depends on which method of saving/loading, and what type of script you're making.
The script i want to make looks like this:
PHP код:
if(strcmp(cmd"/cpo"true) == 0)
    {
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(id,x,y,z);
    new 
tmp[128];
    
tmp strtok(cmdtextidx);
    if(
strlen(tmp) == 0) return SendClientMessage(playeridyellow"/cpo <Object id>"),SendClientMessage(playerid,yellow,"Will create a specific player object"),SendClientMessage(playerid,yellow,"/destlpo to destroy your last created player object."),SendClientMessage(playerid,yellow,"/edlpo to edit your last player object.");
    
GetXYInFrontOfPlayer(playeridxy3.0);
    
SetPlayerChatBubble(playerid,"I have just creaed a player object.Type /oh to learn how to create one.",white,30.0,10000);
    
lpo CreatePlayerObject(playerid,strval(tmp),x,y,z,0,0,0);
    
GameTextForPlayer(id,"~g~Player Object created!",3000,3);
    
FormatMSG(id,green,"You created object id: %d",strval(tmp));
    
SetPVarInt(id,"HCO",1);
    
SetPVarInt(id,"dlpo",1);
    return 
1;
    } 
And as i said before i want the other players to be able to see the objects that another player has made by typing /loadplayerobjects

I would be grateful if you could also tell me how to save the objects that a player has made into an .ini file.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)