17.08.2009, 16:30
pawn Код:
if(strcmp(cmd, "/mддravanus", true) == 0)
{
age = strval(tmp);
if(age < 1 || age > 99)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vanus peab olema 1-99!");
return 1;
}
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KASUTUS: /mддravanus [vanus]");
return 1;
}
new age;
tmp = strtok(cmdtext, idx);
age = strval(tmp);
if(IsPlayerConnected(playa))
{
PlayerInfo[playerid][pAge] = age;
format(string, 256, "SERVER: Sinu uueks vanuseks on %d.", age);
SendClientMessage(COLOR_YELLOW,string,1);
}
}
return 1;
}