01.10.2015, 21:15
I'm making a low-quality DM server for myself and a couple of friends and I was hoping someone could help me
Pretty much what I want is to make random dm areas with their separate spawns, that change every 10 minutes, sort of like an always on-going random rotation.
I havent seen this before so I dont know how complex it is to make, nor do I know where to start.
Code/idea of what I want below:
I want to make it so that the actual rotation doesnt SetPlayerPos unless you are in the "DM rotation",
and another question is how I set the players position on first login? Doesnt need to save or anything just so that when you first login you spawn inside an interior, and when you are ready to join the DM you /start or whatever.
I'm thinking that that would look something like this:
I've been doing extremely basic stuff on and off for a year or two but I still cant seem to figure this out.
This might be alot of work just to help some guy on the internet out, so if needed I can pay a dollar or two.
Thanks alot in beforehand!
Pretty much what I want is to make random dm areas with their separate spawns, that change every 10 minutes, sort of like an always on-going random rotation.
I havent seen this before so I dont know how complex it is to make, nor do I know where to start.
Code/idea of what I want below:
Код:
new gFlintCountyZoneSpawn[][] = { {X,Y,Z}, {X,Y,Z}, {X,Y,Z} }; //And then make one for another spot? new gIdlewoodZoneSpawn[][] = { {X,Y,Z}, {X,Y,Z}, {X,Y,Z} }; public OnGameModeInit() { gRandomZoneTimer = SetTimer("ChangeRandomZone", 60000, true); return 1; } forward ChangeRandomZone(); public ChangeRandomZone() { ????????????????????????????? return 1; }
and another question is how I set the players position on first login? Doesnt need to save or anything just so that when you first login you spawn inside an interior, and when you are ready to join the DM you /start or whatever.
I'm thinking that that would look something like this:
Код:
public OnPlayerConnect(playerid) { gDMRotation[playerid] = 0; return 1; // And then add in like a command to enter rotation? public OnPlayerCommandText(playerid, cmdtext[]) { new idx; new cmd[256]; cmd = strtok(cmdtext, idx); if(strcmp(cmd, "/Start", true) == 0) { gDMRotation[playerid] = 1; return 1; } return 0;
I've been doing extremely basic stuff on and off for a year or two but I still cant seem to figure this out.
This might be alot of work just to help some guy on the internet out, so if needed I can pay a dollar or two.
Thanks alot in beforehand!