19.12.2012, 22:52
sim ele cria uma conta
olha
olha
pawn Код:
if(strcmp(cmd, "/registrar", true) == 0) {
new tmp[256];
tmp = strtok(cmdtext, idx);
// The command shouldn't work if an account with this
// nick already exists
if (udb_Exists(PlayerName(playerid))) {
SendClientMessage(playerid, COLOR_RED, "Tб querendo se registrar duas vezes???");
return 1;
}
// The command shouldn't work if we already are authed
if (PLAYERLIST_authed[playerid] == 1) {
SendClientMessage(playerid, COLOR_RED, "Tб querendo registrar-se logado??? lol?");
return 1;
}
// Did he forgot the password?
if (strlen(tmp)==0) {
SendClientMessage(playerid, COLOR_RED, "Ei, vocк esqueceu de mencionar uma senha. Use /register [senha]");
return 1;
}
// We save the money to the accstate
else{
PLAYERLIST_authed[playerid] = 1;
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------E AQUI TB NO X Y Z --------------------------------------------------------//
udb_Create(PlayerName(playerid), tmp /*senha*/,0 /*crйditos*/, 300 /*grana*/, 0 /*skin*/, 3000 /*gbanco*/, 0 /*gas*/, 0 /*har*/, 0 /*hterra*/, 0 /*hmar*/, 0 /*preso*/, 1 /*prof*/, ""/*clantag*/, 1449.4906/*X*/, -2287.3843/*Y*/, 13.5469/*Z*/, 93.5760/*ang*/, 100.0 /*hp*/);
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
new Float:X, Float:Y, Float:Z, Float:ang;
udb_getPosition(PlayerName(playerid), X, Y, Z);
udb_getAng(PlayerName(playerid), ang);
udb_setGasoline(PlayerName(playerid), 15);
Petrol[playerid] = 15;
//--------------------------------------------------------MUDE AKI NO X Y Z ---------------------------------------------------//
SetSpawnInfo(playerid, 1, udb_getSkin(PlayerName(playerid)), 1449.4906,-2287.3843,13.5469,93.5760, 0, 0, 0, 0, 0, 0);
//-----------------------------------------------------------------------------------------------------------------------------//
SpawnPlayer(playerid);
SetPlayerColor(playerid, COLOR_DESEMPREGADO);
GameTextForPlayer(playerid, "~y~ Registrado ~n~ ~g~E Logado", 5000, 6);
SendClientMessage(playerid, COLOR_GREEN, "Vocк tкm $5000 no banco e + 20 de combustнvel.");
printf("O jogador %s (ID %d) acabou de se registrar",PlayerName(playerid),playerid);
return 1;
}
}