19.06.2011, 03:20
Olб Galera,Estou Tendo um probleminha bem chato!
criei um comando para criaзгo de casas(GF)
ele funciona,salva em .pwn e tudo...
sу que nгo funciona ;s
Comando
Obg
criei um comando para criaзгo de casas(GF)
ele funciona,salva em .pwn e tudo...
sу que nгo funciona ;s
Comando
PHP код:
if(strcmp(cmd,"/criarcasa",true)==0)
{
if (PlayerInfo[playerid][pAdmin] < 1337)
{
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USE: /criarcasa [Numero da Casa]");
SendClientMessage(playerid, COLOR_GRAD1, "| 1: Casa Level 5");
SendClientMessage(playerid, COLOR_GRAD1, "| 2: Casa Level 7");
SendClientMessage(playerid, COLOR_GRAD1, "| 3: Casa Level 9");
SendClientMessage(playerid, COLOR_GRAD1, "| 4: Casa Level 12");
SendClientMessage(playerid, COLOR_GRAD1, "| 5: Casa Level 15");
SendClientMessage(playerid, COLOR_GRAD1, "| 6: Casa VIP Bronze");
SendClientMessage(playerid, COLOR_GRAD1, "| 7: Casa VIP Prata");
SendClientMessage(playerid, COLOR_GRAD1, "| 8: Casa VIP Ouro");
return 1;
}
new casa = strval(tmp);
if(casa < 1 || casa > 8)
{
SendClientMessage(playerid, COLOR_GRAD1, "Numero da Casa Invalido!");
return 1;
}
new Float:CX,Float:CY,Float:CZ;
GetPlayerPos(playerid, CX, CY, CZ);
new File:arquivo=fopen("casas.pwn", io_append);
new casastring[356];
if(casa == 1)
{
format(string, sizeof(string), "Casa LV 5 Criada com sucesso! [Nє%d] ",casa);
format(casastring, sizeof(casastring), "%f,%f,%f,-42.510101,1406.101928,1084.429687,0,0,0,0,0,0,Do Estado,Casa de Teste,300000,1,0,8,1,1,0,1000,1,3045,589,-1,-1,263,5,VW\n", CX, CY, CZ);
}
if(casa == 2)
{
format(string, sizeof(string), "Casa SF 7 Criada com sucesso! [Nє%d] ",casa);
format(casastring, sizeof(casastring), "%f,%f,%f,2468.186767,-1698.214355,1013.507812,0,0,0,0,0,0,Estado,Casa de Teste,500000,0,0,2,1,0,0,1000,1,2045,589,-1,-1,262,7,VW\n", CX, CY, CZ);
}
if(casa == 3)
{
format(string, sizeof(string), "Casa SF 9 Criada com sucesso! [Nє%d] ",casa);
format(casastring, sizeof(casastring), "%f,%f,%f,295.059509,1472.734985,1080.257812,0,0,0,0,0,0,Estado,Casa de Teste,700000,0,0,15,1,0,0,1000,1,8045,589,-1,-1,155,9,VW\n", CX, CY, CZ);
}
if(casa == 4)
{
format(string, sizeof(string), "Casa SF 12 Criada com sucesso! [Nє%d] ",casa);
format(casastring, sizeof(casastring), "%f,%f,%f,295.059509,1472.734985,1080.257812,0,0,0,0,0,0,Estado,Casa de teste,700000,0,0,15,1,0,0,1000,1,2045,589,-1,-1,155,12,VW\n", CX, CY, CZ);
}
if(casa == 5)
{
format(string, sizeof(string), "Casa SF 15 Criada com sucesso! [Nє%d] ",casa);
format(casastring, sizeof(casastring), "%f,%f,%f,226.889404,1114.381347,1080.995971,0,0,0,0,0,0,Estado,Casa de teste,1500000,0,0,5,1,0,0,1000,1,2045,589,-1,-1,155,15,VW\n", CX, CY, CZ);
}
if(casa == 6)
{
format(string, sizeof(string), "Casa Vip Bronze Criada com sucesso! [Nє%d] ",casa);
format(casastring, sizeof(casastring), "%f,%f,%f,2324.530517,-1149.146362,1050.710083,0,0,0,0,0,0,San Andreas New Life,VIP BRONZE,1,0,0,12,1,0,0,1000,1,2045,506,-1,-1,155,50,\n", CX, CY, CZ);
}
if(casa == 7)
{
format(string, sizeof(string), "Casa Vip Prata Criada com sucesso! [Nє%d] ",casa);
format(casastring, sizeof(casastring), "%f,%f,%f,140.188003,1366.523559,1083.859375,0,0,0,0,0,0,San Andreas New Life,VIP PRATA,1,0,0,5,1,0,0,1000,1,2045,451,-1,-1,155,50,VW\n", CX, CY, CZ);
}
if(casa == 8)
{
format(string, sizeof(string), "Casa Vip Ouro Criada com sucesso! [Nє%d] ",casa);
format(casastring, sizeof(casastring), "%f,%f,%f,140.188003,1366.523559,1083.859375,0,0,0,0,0,0,San Andreas New Life,VIP OURO,1,0,0,5,1,0,0,1000,1,2045,541,-1,-1,155,50,VW\n", CX, CY, CZ);
}
fwrite(arquivo, casastring);
fclose(arquivo);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}