07.11.2012, 18:24
Hy guys i creating Stats in TextDraw-s and dont wonna to show me info of player here is cod:
and here is the command:
Код:
stock Stats(playerid) { new string[128],text[128]; //posao if(GetPVarInt(playerid, "Posao") == 1) { text = "Detektiv"; } else if(GetPVarInt(playerid, "Posao") == 2) { text = "Advokat"; } else if(GetPVarInt(playerid, "Posao") == 3) { text = "Prostitutka"; } else if(GetPVarInt(playerid, "Posao") == 4) { text = "Diler Droge"; } else if(GetPVarInt(playerid, "Posao") == 5) { text = "Kradljivac Auta"; } else if(GetPVarInt(playerid, "Posao") == 7) { text = "Automehanicar"; } else if(GetPVarInt(playerid, "Posao") == 8) { text = "Bodyguard"; } else if(GetPVarInt(playerid, "Posao") == 9) { text = "Diler Oruzja"; } else if(GetPVarInt(playerid, "Posao") == 10) { text = "Farmer"; } else if(GetPVarInt(playerid, "Posao") == 12) { text = "Bokser"; } else if(GetPVarInt(playerid, "Posao") == 14) { text = "Vozac Autobusa"; } else if(GetPVarInt(playerid, "Posao") == 15) { text = "Raznosac Novina"; } else if(GetPVarInt(playerid, "Posao") == 16) { text = "Kamiondzija"; } else if(GetPVarInt(playerid, "Posao") == 17) { text = "Raznosac Pice"; } else if(GetPVarInt(playerid, "Posao") == 18) { text = "Uzgajivac Droge"; } else if(GetPVarInt(playerid, "Posao") == 19) { text = "Uzgajivac Droge"; } else if(GetPVarInt(playerid, "Posao") == 20) { text = "Svercer Droge"; } else if(GetPVarInt(playerid, "Posao") == 21) { text = "Cistac Ulica"; } else if(GetPVarInt(playerid, "Posao") == 22) { text = "Svercer Matsa"; } else if(GetPVarInt(playerid, "Posao") == 13) { text = "Proizvodac oruzija"; } else { text = "Nezaposlen"; } // ako je id posla 0 odnosno ako je igrac nezaposlen // format(string,sizeof(string),"Ime i prezime : %s~n~~n~Novac: %d$~n~~n~Posao: %s",GetName(playerid),GetPlayerMoney(playerid),text); TextDrawSetString(StatsTDLevo[playerid], string); // ShowStatsDusan(playerid);//ovo ću objasniti u idućem koraku (korak 4 ) return 1; }
Код:
if (strcmp(cmd, "/stats", true) == 0) { if(GetPlayerState(playerid) != 2) { if(Pokrenuti[playerid] == 0) { Stats(playerid); Pokrenuti[playerid] = 1; }else{SCM(playerid, -1, " Nemozete gledati statse tijekom voћnje !");} } return 1; }