Pinki950
-
Posts
31 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
News
Documentation
Posts posted by Pinki950
-
-
Cum as putea face la OnPlayerSpawn sa imi arate un dialog in loc de asta:
[pawn] switch (classid)
{
case 0: // Classes that will be truckdrivers
{
// Display the name of the class
GameTextForPlayer(playerid, TXT_ClassTrucker, 3000, 4);
// Store the class for the player (truckdriver)
APlayerData[playerid][PlayerClass] = ClassTruckDriver;
}
case 1: // Classes that will be bus-drivers
{
// Display the name of the class
GameTextForPlayer(playerid, TXT_ClassBusDriver, 3000, 4);
// Store the class for the player (busdriver)
APlayerData[playerid][PlayerClass] = ClassBusDriver;
}
case 2: // Classes that will be Pilot
{
// Display the name of the class
GameTextForPlayer(playerid, TXT_ClassPilot, 3000, 4);
// Store the class for the player (pilot)
APlayerData[playerid][PlayerClass] = ClassPilot;
}
case 3: // Classes that will be police
{
// Display the name of the class
GameTextForPlayer(playerid, TXT_ClassPolice, 3000, 4);
// Store the class for the player (police)
APlayerData[playerid][PlayerClass] = ClassPolice;
}
case 4: // Classes that will be mafia
{
// Display the name of the class
GameTextForPlayer(playerid, TXT_ClassMafia, 3000, 4);
// Store the class for the player (mafia)
APlayerData[playerid][PlayerClass] = ClassMafia;
}
case 5: // Classes that will be courier
{
// Display the name of the class
GameTextForPlayer(playerid, TXT_ClassCourier, 3000, 4);
// Store the class for the player (courier)
APlayerData[playerid][PlayerClass] = ClassCourier;
}
case 6: // Classes that will be assistance
{
// Display the name of the class
GameTextForPlayer(playerid, TXT_ClassAssistance, 3000, 4);
// Store the class for the player (assistance)
APlayerData[playerid][PlayerClass] = ClassAssistance;
}
case 7: // Classes that will be roadworker
{
// Display the name of the class
GameTextForPlayer(playerid, TXT_ClassRoadWorker, 3000, 4);
// Store the class for the player (roadworker)
APlayerData[playerid][PlayerClass] = ClassRoadWorker;
}
}[/pawn]
-
Cum as putea sa fac atunci cand scriu parola sa mi-o arate cu bulinutze nu cu litere?
[pawn]// Process the Register-dialog
Dialog_Register(playerid, response, inputtext[])
{
new file[100], Name[MAX_PLAYER_NAME]; // Setup local variables
GetPlayerName(playerid, Name, sizeof(Name)); // Get the playername
format(file, sizeof(file), PlayerFile, Name); // Construct the complete filename for this player's account
switch (response) // Check which button was clicked
{
case 1: // Player clicked "Register"
{
// Check if the player entered a password
if(strlen(inputtext)>0)
{
// Store the password
format(APlayerData[playerid][PlayerPassword], 50, "%s", inputtext);
// Create the file and save default data to it, then reload it (so all data is put into the correct place)
PlayerFile_Create(playerid);
PlayerFile_Load(playerid);
// Send a message to the client to inform him that his account has been registered
SendClientMessage(playerid, 0xFFFFFFFF, TXT_AccountRegistered);
APlayerData[playerid][LoggedIn] = true; // The player has logged in properly
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, TXT_WrongPassword);
Kick(playerid);
}
}
case 0: // Player clicked "Cancel"
{
// Show a message that the player must be registered to play on this server
SendClientMessage(playerid, 0xFFFFFFFF, TXT_PlayerMustRegister);
// Kick the player
Kick(playerid);
}
}
return 1;
}
// Process the login-dialog
Dialog_Login(playerid, response, inputtext[])
{
switch (response) // Check which button was clicked
{
case 1: // Player clicked "Login"
{
// Check if the player entered a password
if (strlen(inputtext) > 0)
{
// Check if the entered password is the same as the password saved in the player's account
if (strcmp(APlayerData[playerid][PlayerPassword], inputtext, false) == 0)
{
APlayerData[playerid][LoggedIn] = true; // The player has logged in properly
BankFile_Load(playerid); // Load your bank account (if it exists, the player will be notified about this)
SendClientMessage(playerid, 0xFFFFFFFF, TXT_LoggedIn); // Send a message to the client to inform him that he logged in properly
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, TXT_WrongPassword);
Kick(playerid);
}
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, TXT_WrongPassword);
Kick(playerid);
}
}
case 0: // Player clicked "Cancel"
{
// Show a message that the player must be logged in to play on this server
SendClientMessage(playerid, 0xFFFFFFFF, TXT_PlayerMustLogin);
// Kick the player
Kick(playerid);
}
}
return 1;
}[/pawn]
-
Cum as putea face cand un player s-a deconectat de pe server sa ii se salveze pozitia X, Y, Z iar cand se conecteaza iar sa fie exact in locul unde a fost deconectat
-
Verifica daca ai includele 0.3X
-
Vreau un tutorial in gen Admin System in care sa imi salveze urmatoarele:
-Password
-Money
-Score
-VIP
-Admin
-Time/Minutes/Seconds Online pe server
Requesting Tutorial Audio!
in Cereri Tutoriale
Posted
Vreau ca atunci cand intru intr-o anumita zona sa imi cante un radio iar cand ies din zona respectiva sa nu mai cante!