Am i doing this rigt?
#1

I'm working on a Dynamic Organisation System, and i just need to show me directions. This is the code,

PHP код:
CMD:createorg(playerid,params[])
{
    new 
Float:xFloat:yFloat:zname[24];
    if(
sscanf(params,"s[24]",name)) return SendClientMessage(playerid,COLOR2,"USAGE: /createorg [NAME]");
    
GetPlayerPos(playerid,x,y,z);
    
Orgs++;
    
CreatePickup(1221,2,x,y,z,0);
    
CreateDynamicCP(x,y,z3.0000,STREAMER_CP_SD, -10);
    
Create3DTextLabel(name0x6495EDx,y,z40.000);
    return 
1;

This piece of code works, it creates the Checkpoint, Pickup and the Label. But, how am i supposed to save these informations? So when the server restarts they're still there?
Reply
#2

with a saving system store the name and coordinates then under gamemodeint load the information from saved files and create the label, pickup and checkpoint
Reply
#3

I'd suggest using MySQL.
  • Create a database for your server, if you haven't already done so.
  • Create a table for your organisations (so when you create one, they have their own row).
  • Insert data into that table such as the label's text, pickup's co-ordinates etc.
  • Ensure you connect to the database accordingly and load the database up when your gamemode starts.
Reply
#4

Thank you, both repped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)