04.07.2012, 12:25
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/createemail", cmdtext, true, 10) == 0)
{
if(GetPlayerMoney(playerid) < 1000)
return SendClientMessage(playerid, 0xAFAFAFAA,"You don't have money enought.");
new email[32];
format(email,32,Local,Player(playerid));
if(dini_Exists(email))
return SendClientMessage(playerid, 0xAFAFAFAA,"You have a computer.");
dini_Create(email);
for(new i=0;i<sizeof(Emails);i++)
dini_Set(email,Emails[i],"Empyt");
GameTextForPlayer(playerid, "Cost: $1000", 5000, 1);
GivePlayerMoney(playerid, -2000);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xAFAFAFAA, "Now you have an e-mail account.");
return 1;
}
I scripted an e-mail system but when i type the cmd /createemail the server close automatically. Could you help me to find the mistake?
{
if (strcmp("/createemail", cmdtext, true, 10) == 0)
{
if(GetPlayerMoney(playerid) < 1000)
return SendClientMessage(playerid, 0xAFAFAFAA,"You don't have money enought.");
new email[32];
format(email,32,Local,Player(playerid));
if(dini_Exists(email))
return SendClientMessage(playerid, 0xAFAFAFAA,"You have a computer.");
dini_Create(email);
for(new i=0;i<sizeof(Emails);i++)
dini_Set(email,Emails[i],"Empyt");
GameTextForPlayer(playerid, "Cost: $1000", 5000, 1);
GivePlayerMoney(playerid, -2000);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xAFAFAFAA, "Now you have an e-mail account.");
return 1;
}
I scripted an e-mail system but when i type the cmd /createemail the server close automatically. Could you help me to find the mistake?