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:x, Float:y, Float:z;
GetPlayerPos(id,x,y,z);
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, yellow, "/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(playerid, x, y, 3.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.