Guest smion Odesláno: 15. Listopad, 2008 Share Odesláno: 15. Listopad, 2008 ked cem aby sa pri nejakom prikaze zadalo id hraca ako napr pri /pm (ID) (TEXT) tak co mam dat? mam dat giveplayerid, playerid ci %d? Link to comment Share on other sites More sharing options...
0 chytrak 14 Odesláno: 15. Listopad, 2008 Share Odesláno: 15. Listopad, 2008 #define dcmd(%1,%2,%3) if((strcmp((%3)[1],#%1,true,(%2))==0)&&((((%3)[(%2)+1]==0)&&(dcmd_%1(playerid,"")))||(((%3)[(%2)+1]==32)&&(dcmd_%1(playerid,(%3)[(%2)+2]))))) return 1 dcmd_text(playerid,params[]) { new pos; new id = strval(params), tvujtext = strval(params[pos]); if (!strlen(params)) return SendClientMessage(playerid, 0xFF0000AA, "pouziti /text id"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "Zadane id neni aktualne pripojeno na serveru"); new string[256]; format(string, sizeof(string), "%s rika hraci %s, ze: %s", PlayerName(playerid), PlayerName(id), tvujtext); SendClientMessageToAll(0xFF0000AA, string); return 1; } Link to comment Share on other sites More sharing options...
0 Guest smion Odesláno: 17. Listopad, 2008 Share Odesláno: 17. Listopad, 2008 #define dcmd(%1,%2,%3) if((strcmp((%3)[1],#%1,true,(%2))==0)&&((((%3)[(%2)+1]==0)&&(dcmd_%1(playerid,"")))||(((%3)[(%2)+1]==32)&&(dcmd_%1(playerid,(%3)[(%2)+2]))))) return 1 dcmd_text(playerid,params[]) { new pos; new id = strval(params), tvujtext = strval(params[pos]); if (!strlen(params)) return SendClientMessage(playerid, 0xFF0000AA, "pouziti /text id"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "Zadane id neni aktualne pripojeno na serveru"); new string[256]; format(string, sizeof(string), "%s rika hraci %s, ze: %s", PlayerName(playerid), PlayerName(id),); SendClientMessageToAll(0xFF0000AA, string); return 1; } tam kde je tvujtext ma byt co take napr.? Link to comment Share on other sites More sharing options...
0 chytrak 14 Odesláno: 17. Listopad, 2008 Share Odesláno: 17. Listopad, 2008 tvujtext je definice paramu, Link to comment Share on other sites More sharing options...
Dotaz
Guest smion
ked cem aby sa pri nejakom prikaze zadalo id hraca ako napr pri /pm (ID) (TEXT) tak co mam dat? mam dat giveplayerid, playerid ci %d?
Link to comment
Share on other sites
3 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now