Hallo, ich habe mir gedacht das ich bei meinen sms das so mache das man pro 10 bustaben 3$ zahlen muss
also:
10Buchstaben = 3§
20 ..... = 6§
usw....
also hier der befehl
dcmd_sms(playerid,params[])
{
new name[128];
new save[128];
GetPlayerName(playerid,name,sizeof(name));
format(save,sizeof(save),"/Acc/%s.ini",name);
MaxHN = dini_Int(save, "Handynummer");
new aname[MAX_PLAYER_NAME], message[128];
GetPlayerName(playerid,aname,sizeof(aname));
if(sscanf(params, "ds[512]", MaxHN, message)) return SendClientMessage(playerid,COLOR_YELLOW,"Benutzung: /sms [Handynummer] [Nachricht]");
if(HatHandy[playerid] == 1)
{
if(HatSimkarte[playerid] == 1)
{
for(new i; i<MAX_PLAYERS; i++)
{
new zname[MAX_PLAYER_NAME], save2[MAX_STRING], save3[MAX_STRING], hnz, hnz2;
GetPlayerName(i,zname,sizeof(zname));
format(save2,sizeof(save2),"/Acc/%s.ini",zname);
format(save3,sizeof(save3),"/Acc/%s.ini",name);
hnz = dini_Int(save2, "Handynummer");
hnz2 = dini_Int(save3, "Handynummer");
if(IsPlayerConnected(i))
{
if(MaxHN>0)
{
if(hnz==MaxHN)
{
new string[128];
format(string, sizeof(string), "SMS von %s (%i): %s ",aname,hnz2,message);
SendClientMessage(i, COLOR_YELLOW, string);
format(string, sizeof(string), "SMS zu %s: %s ", zname, message);
SendClientMessage(playerid, COLOR_YELLOW, string);
print(string);
return 1;
}
}
else{SendClientMessage(playerid, COLOR_RED, "Diese Nummer gibt es nicht!");}
}
}
SendClientMessage(playerid,COLOR_WHITE,"Kein Anschluss unter dieser Nummer");
}
else{SendClientMessage(playerid, COLOR_RED, "Du hast keine Simkarte");}
}
return 1;
}
bitte um hilfe