19.03.2011, 14:55
under public OnPlayerCommandText
Код:
new file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), %s.ini, name); if(strcmp(cmdtext,"/colourred",true) == 0) { SetPlayerColor(playerid,0xff0000ff); return 1' } if(strcmp(cmdtext,"/savecolour",true) == 0) { if(dini_Int(file,"alreadysaved") != 0) return SendClientMessage(playerid,0xff0000ff,"Sorry , but you already saved your color once!"); if(!dini_Int(file,"alreadysaved")) { dini_IntSet(file,"savedcolour",GetPlayerColor(playerid)); dini_IntSet(file,"alreadysaved",1); } return 1; }