[Tutorial] Creating A Simple Mini Game Base
#8

Quote:
Originally Posted by PowerPC603
Посмотреть сообщение
I have a few suggestions:
pawn Код:
new name[24];
There is no need to set the length of the name to 129, as SAMP only handles playernames of maximum 20 characters.

pawn Код:
dcmd_exit(playerid,params[])
{
     IsInMini[playerid] = 0;
     SetPlayerVirtualWorld(playerid,0);
     return 1;
}
In the exit-command, you forgot to put the player back in the normal world.
Quote:
Originally Posted by Grim_
Посмотреть сообщение
Even better, use the MAX_PLAYER_NAME definition in case a newer version comes which supports more characters for the player name. That way you wouldn't be forced to change all the variables in your script that store the player's names.

Also, I suggest switching your command processor to ZCMD - A quicker and more efficient way of processing commands. It also provides more features compared to DCMD. You can also look into Y_Command, which offers a vast array of features.

Finally, I believe you messed up this piece of code here:
pawn Код:
GetPlayerName(killerid,killer,sizeof(killer));
GetPlayerName(playerid,killer,sizeof(killed));
You get and store the names of both players into the same variable. It should look like so:
pawn Код:
GetPlayerName(killerid,killer,sizeof(killer));
GetPlayerName(playerid,killed,sizeof(killed));
You could also add in a statement to check whether or not the killer is a valid player. Currently, if the player falls to their death, it will send an invalid killer name (most likely a space or nothing).

Please, do not take any of these suggestions as rude comments, they are simple things I'm trying to point out to you. Other than that, it looks like a good tutorial. Very well constructed and in-depth explanation, good job.
Thank you for the help guys, and i take criticism well so you dont have to worry, the reason i used an array of 129 is because i wanted to teach a little bit about arrays, so this is a double lesson :P
Reply


Messages In This Thread
Creating A Simple Mini Game Base - by kin - 26.01.2011, 03:46
Re: Creating A Simple Mini Game Base - by kin - 26.01.2011, 03:47
Re: Creating A Simple Mini Game Base - by Lorenc_ - 26.01.2011, 03:49
Re: Creating A Simple Mini Game Base - by kin - 26.01.2011, 03:53
Re: Creating A Simple Mini Game Base - by PowerPC603 - 26.01.2011, 05:33
Re: Creating A Simple Mini Game Base - by Grim_ - 26.01.2011, 06:03
Re: Creating A Simple Mini Game Base - by Kitten - 26.01.2011, 06:15
Re: Creating A Simple Mini Game Base - by kin - 26.01.2011, 21:49
Re: Creating A Simple Mini Game Base - by Ironboy - 27.03.2011, 08:24
Re: Creating A Simple Mini Game Base - by Stigg - 27.03.2011, 11:46

Forum Jump:


Users browsing this thread: 1 Guest(s)