Exemple #1
0
 function createNewNoteStartIncomplete($gameId, $playerId, $lat = 0, $lon = 0)
 {
     $query = "INSERT INTO notes (game_id, owner_id, title, incomplete) VALUES ('{$gameId}', '{$playerId}', 'New Note', '1')";
     Module::query($query);
     if (mysql_error()) {
         return new returnData(1, NULL, mysql_error());
     }
     $nId = mysql_insert_id();
     Module::saveContentNoAuthentication($gameId, false, 0, 'PlayerNote', $nId, 0);
     Module::processGameEvent($playerId, $gameId, Module::kLOG_GET_NOTE, $nId);
     Players::dropNote($gameId, $playerId, $nId, $lat, $lon);
     return new returnData(0, $nId);
 }