22.06.2016, 21:12
new string[600] ;
No. Never. Ever.
No. Never. Ever.
pawn Код:
//TOP OF SCRIPT
new bool: IsPlayerInDM[MAX_PLAYERS]; // 0 = false, 1 = true.
CMD:dmpirate(playerid, params[]) // If CMD Doesn't work replace with COMMAND
{
new string[128], pname[MAX_PLAYER_NAME]; // The larger the string, the larger the file, in result the more lag.
GetPlayerName(playerid, pname, sizeof(pname));
if(IsPlayerInDM[playerid] == true) return SendClientMessage(playerid, COLOR_ORANGE, "Tu es deja dans le dm Pirate, fait /dmpirateq pour le quitter");
IsPlayerInDM[playerid] = true;
format(string, sizeof(string), "%s A rejoint le /dmpirate, rejoignez le !", pname);
SendClientMessageToAll(COLOR_ORANGE, string);
SendClientMessage(playerid, COLOR_ORANGE, "Tu as rejoint le dm pirate");
SetPlayerPos(playerid, -2050.0810547,-7609.0312500,2.2020721);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 26, 900);
GivePlayerWeapon(playerid, 24, 900);
SetPlayerFacingAngle(playerid, 0);
return 1;
}
PF: OnPlayerSpawn(playerid)
{
if(IsPlayerInDM[playerid] == true)
{
SetPlayerPos(playerid, -2050.0810547,-7609.0312500,2.2020721);
GivePlayerWeapon(playerid, 26, 900);
GivePlayerWeapon(playerid, 24, 900);
SetPlayerFacingAngle(playerid, 0);
}
else {
// Place Current spawn info here. Outside of DM
}
return true;
}