10.05.2009, 21:12
Actualy I think a better explaination of stock is:
If you want to do a command like checking if a player exists in a code (mysql scripting)
instead of making your code like:
You can do it in a stock so you do it like
I do everything in stocks also.
---------------
Your new question:
You can do it like
Will get your current health and will add 50.
If you want to do a command like checking if a player exists in a code (mysql scripting)
instead of making your code like:
pawn Код:
///command.
format(string,sizeof(string),"SELECT * FROM `table` WHERE name='%s'",randomname);
samp_mysql_query(string);
samp_mysql_store_result(); // etc etc.
pawn Код:
///command
if(CheckPlayerExistant(variable))
{
//code
//code
//code
}
else return SendClientMessage(playerid,color,"player does not exists");
---------------
Your new question:
Quote:
Originally Posted by Buttig
So for example, see:
pawn Код:
|
pawn Код:
if(!strcmp(cmdtext,"/givehealth",true))
return GiveHealth(playerid,50);